Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- train_datagen = ImageDataGenerator(
- rescale=1./255,
- shear_range=0.2,
- zoom_range=0.2,
- horizontal_flip=True)
- test_datagen = ImageDataGenerator(rescale=1./255)
- train_generator = train_datagen.flow_from_directory(
- (os.path.join(root,'train')),save_format='jpg',
- seed= seed,
- target_size=(150, 150),
- batch_size=32,
- class_mode=None)
- model.fit_generator(train_generator, steps_per_epoch=50,
- epochs=stop_epoch, callbacks=[keras.callbacks.TensorBoard()], initial_epoch=start_epoch, verbose=1)
- Traceback (most recent call last):
- File "main.py", line 210, in <module>
- train(run_name, 0, 20, 128)
- File "main.py", line 195, in train
- epochs=stop_epoch, initial_epoch=start_epoch, verbose=1)
- File "/home/jetjodh/.local/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
- return func(*args, **kwargs)
- File "/home/jetjodh/.local/lib/python3.6/site-packages/keras/engine/training.py", line 1426, in fit_generator
- initial_epoch=initial_epoch)
- File "/home/jetjodh/.local/lib/python3.6/site-packages/keras/engine/training_generator.py", line 172, in fit_generator
- str(generator_output))
- ValueError: Output of generator should be a tuple `(x, y, sample_weight)` or `(x, y)`. Found: [[[[0.9287941 0.98616695 0.98947084]
- [0.923741 0.9964284 0.9964284 ]
- [0.9058824 1. 1. ]
- ...
- [0.25882354 0.18823531 0.24313727]
- [0.25715023 0.18693382 0.24164987]
- [0.22426708 0.16135807 0.21242042]]
- [[0.92581874 0.9881919 0.9914958 ]
- [0.91688335 0.99704826 0.9971155 ]
- [0.8983345 0.9992453 1. ]
- ...
- [0.25322673 0.1810394 0.23194364]
- [0.25185463 0.17988682 0.23079321]
- [0.22493346 0.15729035 0.20826909]]
- [[0.9133229 0.9966962 1. ]
- [0.888097 0.9996502 1. ]
- [0.86666673 0.9960785 1. ]
- ...
- [0.23137257 0.15294118 0.18823531]
- [0.23118663 0.1523834 0.18842123]
- [0.22753295 0.14142238 0.19207491]]
- ...
- [[0.10054813 0.08005449 0.07897777]
- [0.09497012 0.08762365 0.08174881]
- [0.09681008 0.05793095 0.06185251]
- ...
- [0.11802838 0.10348602 0.09918315]
- [0.1177292 0.10369128 0.09884841]
- [0.11184555 0.10770205 0.09225368]]
- [[0.09867962 0.07762794 0.07822537]
- [0.10395174 0.09369469 0.0974997 ]
- [0.1251514 0.08981492 0.09373649]
- ...
- [0.12156864 0.11764707 0.10980393]
- [0.12194049 0.11801892 0.10980393]
- [0.12924784 0.12532628 0.10980393]]
- [[0.09865696 0.07759851 0.07821624]
- [0.1040599 0.0937678 0.09768937]
- [0.1254902 0.09019608 0.09411766]
- ...
- [0.12156864 0.11764707 0.10980393]
- [0.12194049 0.11801892 0.10980393]
- [0.12924784 0.12532628 0.10980393]]]
- [[[1. 0.9921569 0.9960785 ]
- [1. 0.9921569 0.9960785 ]
- [1. 0.9921569 0.9960785 ]
- ...
- [0.9960785 0.9921569 0.97647065]
- [0.9960785 0.9921569 0.97647065]
- [0.9960785 0.9884505 0.99129623]]
- [[1. 0.9921569 0.9960785 ]
- [1. 0.9921569 0.9960785 ]
- [1. 0.9921569 0.9960785 ]
- ...
- [0.9960785 0.9921569 0.97647065]
- [0.9960785 0.9921569 0.97647065]
- [0.9960785 0.9884505 0.99129623]]
- [[1. 0.9921569 0.9960785 ]
- [1. 0.9921569 0.9960785 ]
- [1. 0.9921569 0.9960785 ]
- ...
- [0.9960785 0.9921569 0.97647065]
- [0.9960785 0.9921569 0.97647065]
- [0.9960785 0.9884505 0.99129623]]
- ...
- [[0.05179779 0.67802274 0.8660537 ]
- [0.04731967 0.68209213 0.86666673]
- [0.05406292 0.67885095 0.8456544 ]
- ...
- [0.13984822 0.71021265 0.893709 ]
- [0.09093058 0.72526425 0.87865746]
- [0.03460015 0.68471986 0.8339547 ]]
- [[0.05179779 0.67802274 0.8660537 ]
- [0.04731967 0.68209213 0.86666673]
- [0.05406292 0.67885095 0.8456544 ]
- ...
- [0.13984822 0.71021265 0.893709 ]
- [0.09093058 0.72526425 0.87865746]
- [0.03460015 0.68471986 0.8339547 ]]
- [[0.05179779 0.67802274 0.8660537 ]
- [0.04731967 0.68209213 0.86666673]
- [0.05406292 0.67885095 0.8456544 ]
- ...
- [0.13984822 0.71021265 0.893709 ]
- [0.09093058 0.72526425 0.87865746]
- [0.03460015 0.68471986 0.8339547 ]]]
- [[[0.07450981 0.00392157 0.00392157]
- [0.07450981 0.00392157 0.00392157]
- [0.07450981 0.00392157 0.00392157]
- ...
- [0.14117648 0.01176471 0. ]
- [0.14117648 0.01176471 0. ]
- [0.14117648 0.01176471 0. ]]
- [[0.07450981 0.00392157 0.00392157]
- [0.07450981 0.00392157 0.00392157]
- [0.07450981 0.00392157 0.00392157]
- ...
- [0.14117648 0.01176471 0. ]
- [0.14117648 0.01176471 0. ]
- [0.14117648 0.01176471 0. ]]
- [[0.07450981 0.00392157 0.00392157]
- [0.07450981 0.00392157 0.00392157]
- [0.07450981 0.00392157 0.00392157]
- ...
- [0.14117648 0.01176471 0. ]
- [0.14117648 0.01176471 0. ]
- [0.14117648 0.01176471 0. ]]
- ...
- [[0.25490198 0.05882353 0.01568628]
- [0.25490198 0.05882353 0.01568628]
- [0.25490198 0.05882353 0.01568628]
- ...
- [0.09019608 0.00392157 0.01568628]
- [0.09019608 0.00392157 0.01568628]
- [0.09019608 0.00392157 0.01568628]]
- [[0.25490198 0.05882353 0.01568628]
- [0.25490198 0.05882353 0.01568628]
- [0.25490198 0.05882353 0.01568628]
- ...
- [0.09019608 0.00392157 0.01568628]
- [0.09019608 0.00392157 0.01568628]
- [0.09019608 0.00392157 0.01568628]]
- [[0.25490198 0.05882353 0.01568628]
- [0.25490198 0.05882353 0.01568628]
- [0.25490198 0.05882353 0.01568628]
- ...
- [0.09019608 0.00392157 0.01568628]
- [0.09019608 0.00392157 0.01568628]
- [0.09019608 0.00392157 0.01568628]]]
- ...
- [[[0.26692864 0.09411766 0.01054484]
- [0.2669101 0.09411766 0.01053866]
- [0.26689157 0.09411766 0.01053248]
- ...
- [0.9450981 0.7568628 0.36896312]
- [0.9450981 0.7568628 0.3689755 ]
- [0.9450981 0.7568628 0.3689879 ]]
- [[0.2608034 0.09609751 0.00982299]
- [0.26081574 0.09610987 0.00983535]
- [0.26082814 0.09612223 0.00984771]
- ...
- [0.9507941 0.76635617 0.38204244]
- [0.95081264 0.7663871 0.38207334]
- [0.95083123 0.76641804 0.38210425]]
- [[0.26666668 0.10196079 0.01568628]
- [0.26666668 0.10196079 0.01568628]
- [0.26666668 0.10196079 0.01568628]
- ...
- [0.9568628 0.77647066 0.3921569 ]
- [0.9568628 0.77647066 0.3921569 ]
- [0.9568628 0.77647066 0.3921569 ]]
- ...
- [[0.18823531 0.08627451 0.02745098]
- [0.18823531 0.08627451 0.02745098]
- [0.18823531 0.08627451 0.02745098]
- ...
- [0.15294118 0.03137255 0.01176471]
- [0.15294118 0.03137255 0.01176471]
- [0.15294118 0.03137255 0.01176471]]
- [[0.18575254 0.08379175 0.02993376]
- [0.18574636 0.08378556 0.02993994]
- [0.18574016 0.08377938 0.02994612]
- ...
- [0.13937508 0.02798102 0.01176471]
- [0.13935035 0.02797484 0.01176471]
- [0.13932563 0.02796866 0.01176471]]
- [[0.18206091 0.08010011 0.02911972]
- [0.18205471 0.08009394 0.02911354]
- [0.18204854 0.08008775 0.02910735]
- ...
- [0.12777016 0.02745098 0.01176471]
- [0.1277516 0.02745098 0.01176471]
- [0.12773307 0.02745098 0.01176471]]]
- [[[0.56078434 0.6627451 0.7607844 ]
- [0.56078434 0.6627451 0.7607844 ]
- [0.56078434 0.6627451 0.7607844 ]
- ...
- [0.58431375 0.6627451 0.7686275 ]
- [0.58431375 0.6627451 0.7686275 ]
- [0.58431375 0.6627451 0.7686275 ]]
- [[0.56078434 0.6627451 0.7607844 ]
- [0.56078434 0.6627451 0.7607844 ]
- [0.56078434 0.6627451 0.7607844 ]
- ...
- [0.58431375 0.6627451 0.7686275 ]
- [0.58431375 0.6627451 0.7686275 ]
- [0.58431375 0.6627451 0.7686275 ]]
- [[0.56078434 0.6627451 0.7607844 ]
- [0.56078434 0.6627451 0.7607844 ]
- [0.56078434 0.6627451 0.7607844 ]
- ...
- [0.58431375 0.6627451 0.7686275 ]
- [0.58431375 0.6627451 0.7686275 ]
- [0.58431375 0.6627451 0.7686275 ]]
- ...
- [[0.56078434 0.65882355 0.77647066]
- [0.56078434 0.65882355 0.77647066]
- [0.56078434 0.65882355 0.77647066]
- ...
- [0.5921569 0.67058825 0.77647066]
- [0.5921569 0.67058825 0.77647066]
- [0.5921569 0.67058825 0.77647066]]
- [[0.56078434 0.65882355 0.77647066]
- [0.56078434 0.65882355 0.77647066]
- [0.56078434 0.65882355 0.77647066]
- ...
- [0.5921569 0.67058825 0.77647066]
- [0.5921569 0.67058825 0.77647066]
- [0.5921569 0.67058825 0.77647066]]
- [[0.56078434 0.65882355 0.77647066]
- [0.56078434 0.65882355 0.77647066]
- [0.56078434 0.65882355 0.77647066]
- ...
- [0.5921569 0.67058825 0.77647066]
- [0.5921569 0.67058825 0.77647066]
- [0.5921569 0.67058825 0.77647066]]]
- [[[0.7411765 0.74509805 0.72156864]
- [0.7411765 0.74509805 0.72156864]
- [0.7411765 0.74509805 0.72156864]
- ...
- [0.7725491 0.7686275 0.75294125]
- [0.7725491 0.7686275 0.75294125]
- [0.77424186 0.7703203 0.754634 ]]
- [[0.7411765 0.74509805 0.72156864]
- [0.7411765 0.74509805 0.72156864]
- [0.7411765 0.74509805 0.72156864]
- ...
- [0.774178 0.77025646 0.7545702 ]
- [0.774739 0.77081746 0.7551312 ]
- [0.7754909 0.7715693 0.75588304]]
- [[0.7411765 0.74509805 0.72156864]
- [0.7411765 0.74509805 0.72156864]
- [0.7411765 0.74509805 0.72156864]
- ...
- [0.77547634 0.77155477 0.7558685 ]
- [0.77647066 0.7725491 0.7568628 ]
- [0.77647066 0.7725491 0.7568628 ]]
- ...
- [[0.7490196 0.74509805 0.7294118 ]
- [0.7490196 0.74509805 0.7294118 ]
- [0.7490196 0.74509805 0.7294118 ]
- ...
- [0.7609342 0.76477 0.7397667 ]
- [0.7610263 0.76485443 0.74188584]
- [0.7626933 0.7665137 0.7452403 ]]
- [[0.7390622 0.7351406 0.72443306]
- [0.7390315 0.7351099 0.7244177 ]
- [0.7390008 0.7350792 0.72440237]
- ...
- [0.7671012 0.7674058 0.76358956]
- [0.7701688 0.7704657 0.7686841 ]
- [0.77023816 0.7705274 0.76891667]]
- [[0.73333335 0.7294118 0.72156864]
- [0.73333335 0.7294118 0.72156864]
- [0.73333335 0.7294118 0.72156864]
- ...
- [0.7676332 0.7676332 0.7656446 ]
- [0.77093756 0.77093756 0.77093756]
- [0.77085626 0.77085626 0.77085626]]]]
Add Comment
Please, Sign In to add comment