You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. error on G_loss.
--------------- Epoch 1 ---------------
0it [00:00, ?it/s]
Traceback (most recent call last):
File "new_pix2pix.py", line 255, in
train(200,12)
File "new_pix2pix.py", line 242, in train
G_loss.append(gloss)
UnboundLocalError: local variable 'gloss' referenced before assignment
So, I commented out G_loss and D_loss. And now it returns an another error #G_loss.append(gloss)
#D_loss.append(dloss)
...
#D_loss = np.array(D_loss)
#G_loss = np.array(G_loss)
#np.save('Model_para/dloss.npy',D_loss)
#np.save('Model_para/gloss.npy',G_loss)
2. error on dimensions
--------------- Epoch 1 ---------------
0it [00:00, ?it/s]
Traceback (most recent call last):
File "new_pix2pix.py", line 255, in
train(200,12)
File "new_pix2pix.py", line 245, in train
generate_pic(generator,target[0:1],e)
File "new_pix2pix.py", line 187, in generate_pic
pic = generator.predict(target)
File "/home/marsha/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 1576, in predict
check_batch_axis=False)
File "/home/marsha/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 127, in _standardize_input_data
str(array.shape))
ValueError: Error when checking : expected input_1 to have 4 dimensions, but got array with shape (0, 1)
The text was updated successfully, but these errors were encountered:
Hi, I have two errors during training.
1. error on G_loss.
--------------- Epoch 1 ---------------
0it [00:00, ?it/s]
Traceback (most recent call last):
File "new_pix2pix.py", line 255, in
train(200,12)
File "new_pix2pix.py", line 242, in train
G_loss.append(gloss)
UnboundLocalError: local variable 'gloss' referenced before assignment
So, I commented out G_loss and D_loss. And now it returns an another error
#G_loss.append(gloss)
#D_loss.append(dloss)
...
#D_loss = np.array(D_loss)
#G_loss = np.array(G_loss)
#np.save('Model_para/dloss.npy',D_loss)
#np.save('Model_para/gloss.npy',G_loss)
2. error on dimensions
--------------- Epoch 1 ---------------
0it [00:00, ?it/s]
Traceback (most recent call last):
File "new_pix2pix.py", line 255, in
train(200,12)
File "new_pix2pix.py", line 245, in train
generate_pic(generator,target[0:1],e)
File "new_pix2pix.py", line 187, in generate_pic
pic = generator.predict(target)
File "/home/marsha/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 1576, in predict
check_batch_axis=False)
File "/home/marsha/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 127, in _standardize_input_data
str(array.shape))
ValueError: Error when checking : expected input_1 to have 4 dimensions, but got array with shape (0, 1)
The text was updated successfully, but these errors were encountered: