ykamikawa/tf-keras-SegNet

TypeError: 'NoneType' object is not subscriptable

e1746288 opened this issue · 1 comments

Hi,

I am trying to run the demo code (default parameters on LIP dataset). However, after printing the network structure, it prints the following error message:

`==================================================================================================
Total params: 29,460,260
Trainable params: 29,444,348
Non-trainable params: 15,912


None
Epoch 1/10
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\ProgramData\Anaconda3\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras-2.0.9-py3.6.egg\keras\utils\data_utils.py", line 630, in data_generator_task
generator_output = next(self._generator)
File "C:\Users\Baris\Desktop\SegNet-master\generator.py", line 24, in data_gen_small
original_img = cv2.imread(img_dir + lists.iloc[i, 0]+".jpg")[:, :, ::-1]
TypeError: 'NoneType' object is not subscriptable

Traceback (most recent call last):
File "SegNet.py", line 225, in
segnet.fit_generator(train_gen, steps_per_epoch=args.epoch_steps, epochs=args.n_epochs, validation_data=val_gen, validation_steps=args.val_steps)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras-2.0.9-py3.6.egg\keras\legacy\interfaces.py", line 87, in wrapper
File "C:\ProgramData\Anaconda3\lib\site-packages\keras-2.0.9-py3.6.egg\keras\engine\training.py", line 2048, in fit_generator
StopIteration`

What could be the problem?

I meet this problem ,too