AliaksandrSiarohin / pose-gan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Training has two problems on two data sets

Gavin-Evans opened this issue · comments

on market
problem one :
Can not find definition of predict_on_batch() function in train.py(including other modules) in the file of gan
leading to error:

Traceback (most recent call last): File "train.py", line 29, in <module> main() File "train.py", line 26, in main trainer.train() File "/home/hyw/zp/keras/pose-gan-master/gan/train.py", line 104, in train self.save_generated_images() File "/home/hyw/zp/keras/pose-gan-master/gan/train.py", line 45, in save_generated_images image = self.dataset.display(self.generator.predict_on_batch(batch), batch) File "/home/hyw/zp/Anaconda2_pytorch_keras/lib/python2.7/site-packages/keras/engine/training.py", line 1274, in predict_on_batch outputs = self.predict_function(ins) File "/home/hyw/zp/Anaconda2_pytorch_keras/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 2715, in __call__ return self._call(inputs) File "/home/hyw/zp/Anaconda2_pytorch_keras/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 2671, in _call session) File "/home/hyw/zp/Anaconda2_pytorch_keras/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 2623, in _make_callable callable_fn = session._make_callable_from_options(callable_opts) File "/home/hyw/zp/Anaconda2_pytorch_keras/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1471, in _make_callable_from_options return BaseSession._Callable(self, callable_options) File "/home/hyw/zp/Anaconda2_pytorch_keras/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1425, in __init__ session._session, options_ptr, status) File "/home/hyw/zp/Anaconda2_pytorch_keras/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 528, in __exit__ c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.InvalidArgumentError: input_1:0 is both fed and fetched. Exception tensorflow.python.framework.errors_impl.InvalidArgumentError: InvalidArgumentError() in <bound method _Callable.__del__ of <tensorflow.python.client.session._Callable object at 0x7f7149a0aed0>> ignored
Can you explain how I should deal with this problem? please

question two :
on deepfashion
error as follows:

Traceback (most recent call last): File "train.py", line 29, in <module> main() File "train.py", line 26, in main trainer.train() File "/home/hyw/zp/keras/pose-gan-master/gan/train.py", line 104, in train self.save_generated_images() File "/home/hyw/zp/keras/pose-gan-master/gan/train.py", line 42, in save_generated_images batch = self.dataset.next_generator_sample_test() File "/home/hyw/zp/keras/pose-gan-master/pose_dataset.py", line 174, in next_generator_sample_test batch = self.load_batch(index, False, True) File "/home/hyw/zp/keras/pose-gan-master/pose_dataset.py", line 153, in load_batch result = [self.load_image_batch(pair_df, 'from')] File "/home/hyw/zp/keras/pose-gan-master/pose_dataset.py", line 131, in load_image_batch batch[i] = imread(os.path.join(self._images_dir_test, p[direction])) ValueError: could not broadcast input array from shape (1101,750,3) into shape (256,256,3)
How should I deal with this problem?

thanks a lot !!!

  1. Have you use:
    git clone --recursive https://github.com/AliaksandrSiarohin/pose-gan/
  2. What is the size of images. They have 2 versions one is old (where all the images have the resolution 256x256) another one is HD. I use old version.
  1. Have you use:
    git clone --recursive https://github.com/AliaksandrSiarohin/pose-gan/
  2. What is the size of images. They have 2 versions one is old (where all the images have the resolution 256x256) another one is HD. I use old version.

I use the new one, It's 1101X750
I got it ,thanks a lot, but the question one ?

For the question 1, have you use:
git clone --recursive https://github.com/AliaksandrSiarohin/pose-gan/

OK ,thank you