GithubHelp home page GithubHelp logo

pix2pix's People

Contributors

ray0809 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pix2pix's Issues

Global name not defined error

Using TensorFlow backend.
Epochs 200
Bathc_size 12
Batches per epoch 31
Traceback (most recent call last):
File "new_pix2pix.py", line 252, in
train(200,12)
File "new_pix2pix.py", line 209, in train
discriminator = discriminator_model()
File "new_pix2pix.py", line 147, in discriminator_model
inputs = Input(shape=(img_cols,img_rows,IN_CH*2))
NameError: global name 'img_cols' is not defined

I am getting the above error ...
Can you please help resolve this issue.

input files required for running code

sir ,
QUE 1 ) https://github.com/ray0809/pix2pix/blob/master/data.py needs image files (jpg and png) in folder /home/ray/python_code/keras_examples/pix2pix/CMP_facade_DB_base/base .
How can I get those ?
QUE 2 ) My understanding is that parameters of neural network are learnt when we have pair of files labelled as corresponding input and output . After training we give an unknown input image and neural network generates output image using parameters it has learnt earlier . Is that alright ?
That leads me to think that pic folder should have atleast 2 files (jpg , one input and one output)
Target folder can have 1 png file if we desire to predict the output for this input png image .
Is that ok ?

Will wait for your reply.
Thanks for reading.

training error

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)

.npy

I cannot understand the format of *.npy, can u explain or push the files.
pic = np.load('pic.npy')
target = np.load('target.npy')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.