DCGAN-tensorflow icon indicating copy to clipboard operation
DCGAN-tensorflow copied to clipboard

IndexError: list index out of range with custom dataset

Open hardikchauhan8 opened this issue 7 years ago • 8 comments

Hello all, I am trying to run this on my own dataset of flowers, but I am getting this error,

$ python main.py --dataset=flowares --train {'batch_size': 64, 'beta1': 0.5, 'checkpoint_dir': 'checkpoint', 'crop': False, 'dataset': 'flowares', 'epoch': 25, 'generate_test_images': 100, 'input_fname_pattern': '*.jpg', 'input_height': 108, 'input_width': None, 'learning_rate': 0.0002, 'output_height': 64, 'output_width': None, 'sample_dir': 'samples', 'train': True, 'train_size': inf, 'visualize': False} 2018-01-11 18:40:07.522922: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX Traceback (most recent call last): File "main.py", line 100, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 78, in main sample_dir=FLAGS.sample_dir) File "/home/sohilparekh/Desktop/HardikC/DCGAN-tensorflow/model.py", line 78, in init imreadImg = imread(self.data[0]) IndexError: list index out of range

hardikchauhan8 avatar Jan 11 '18 13:01 hardikchauhan8

请问问题解决了吗,我也是这个问题,如果解决了可以告诉一下解决方法吗,跪谢

lulujiang1281 avatar Jan 18 '18 16:01 lulujiang1281

This is because your pictures are not "*.jpg" format, your can set the option according to your own format, like this: python main.py --dataset=flowares --input_fname_pattern="*.png" --train

zlyx525 avatar Jan 19 '18 02:01 zlyx525

My images are all '*.jpg',but i met this problem too

chengxiqiao avatar Mar 11 '18 03:03 chengxiqiao

wait!!!dalao come to see!!!

738654805 avatar Mar 27 '18 14:03 738654805

data_dir + dataset = real dir path that store your pictures

changecheng avatar Apr 14 '18 08:04 changecheng

Can you solved this problem?

YuzuruHanyu520 avatar Dec 17 '19 04:12 YuzuruHanyu520

I meet the problem too.

jcForDream avatar Jul 20 '22 11:07 jcForDream

您好:       来信我已收到,我会尽快回复的。

lihh1023 avatar Jul 20 '22 11:07 lihh1023