Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute Error during training with neuralgym #9

Closed
ecemlago opened this issue Mar 29, 2018 · 2 comments
Closed

Attribute Error during training with neuralgym #9

ecemlago opened this issue Mar 29, 2018 · 2 comments

Comments

@ecemlago
Copy link

Hi,

Thank you so much for such an impressive work and sharing it.

I would like to train this approach on a new dataset. However during training, I get the following error:
Exception in thread Thread-13:

Traceback (most recent call last):

File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/neuralgym/data/feeding_queue_runner.py", line 194, in _run
data = func()
File "/usr/local/lib/python3.5/dist-packages/neuralgym/data/data_from_fnames.py", line 143, in
feed_dict_op=[lambda: self.next_batch()],
File "/usr/local/lib/python3.5/dist-packages/neuralgym/data/data_from_fnames.py", line 180, in next_batch
random_h, random_w, align=False) # use last rand
File "/usr/local/lib/python3.5/dist-packages/neuralgym/ops/image_ops.py", line 50, in np_random_crop
image = np_scale_to_shape(image, shape, align=align)
File "/usr/local/lib/python3.5/dist-packages/neuralgym/ops/image_ops.py", line 23, in np_scale_to_shape
imgh, imgw = image.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
�[32m[2018-03-29 10:02:11 @data_from_fnames.py:153]�[0m image is None, sleep this thread for 0.1s.

Do you have any idea what might be causing that?

During training, the model is saved in model_logs directory, however, I cannot observe any generated/inpainted images since no images are being saved during training. Is that right?

Sorry for many questions!

Thank you so much for your help!

Regards,
Ecem

@JiahuiYu
Copy link
Owner

Hi,

Most likely your path to image is wrong and opencv cannot read the image. Thus, image is NoneType.

For training images, you can run tensorboard --logdir model_logs, all training and validation images will be saved once per 1000 iterations.

@ecemlago
Copy link
Author

Thanks a lot for your help! I appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants