DeepRNN / image_captioning

Tensorflow implementation of "Show, Attend and Tell: Neural Image Caption Generation with Visual Attention"
MIT License
785 stars 354 forks source link

how can I use part of training data? #51

Open Brian0906 opened 5 years ago

Brian0906 commented 5 years ago

If I just put some of the training data into the /images fold, there is always an error shown below.

Training the model... epoch: 0%| | 0/100 [00:00<?, ?it/s] Traceback (most recent call last): | 0/11290 [00:00<?, ?it/s] File "main.py", line 72, in tf.app.run() File "/anaconda3/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "main.py", line 53, in main model.train(sess, data) File "/Users/brian/Downloads/show-attend-and-tell-master/base_model.py", line 50, in train images = self.image_loader.load_images(image_files) File "/Users/brian/Downloads/show-attend-and-tell-master/utils/misc.py", line 34, in load_images images.append(self.load_image(image_file)) File "/Users/brian/Downloads/show-attend-and-tell-master/utils/misc.py", line 18, in load_image temp = image.swapaxes(0, 2) AttributeError: 'NoneType' object has no attribute 'swapaxes'

Kinghup commented 5 years ago

The problem is common, you need to check the train data folder. And it's sure the folder contains the imsges directly