deepimagej / python4deepimagej

BSD 2-Clause "Simplified" License
14 stars 5 forks source link

Found 0 images belonging to 1 classes. #3

Closed zz636 closed 4 years ago

zz636 commented 4 years ago

Hi, I am trying to use train_and_test_unet.ipynb to replicate the training process but I got an error when I run

model.fit_generator(trainGen, steps_per_epoch=500, epochs=1, callbacks=[model_checkpoint], validation_data = validGen, validation_steps = 5) The error is below Found 0 images belonging to 1 classes. Found 0 images belonging to 1 classes. Found 0 images belonging to 1 classes. Found 0 images belonging to 1 classes. Epoch 1/1

ValueError Traceback (most recent call last)

in () 10 callbacks=[model_checkpoint], 11 validation_data = validGen, ---> 12 validation_steps = 5) 12 frames <__array_function__ internals> in amax(*args, **kwargs) /usr/local/lib/python3.6/dist-packages/numpy/core/fromnumeric.py in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs) 88 return reduction(axis=axis, out=out, **passkwargs) 89 ---> 90 return ufunc.reduce(obj, axis, dtype, out, **passkwargs) 91 92 ValueError: zero-size array to reduction operation maximum which has no identity Is it because the dataGenerate is empty so that there is no image there? Many thanks for your help!
zz636 commented 4 years ago

There was a typo in my code, sorry.