jeffery-zhougang / DeeplabV3Plus-Keras-Retraining

使用自己的数据集retraining DeeplabV3+
32 stars 8 forks source link

训练输入一直报错 #2

Closed zhounan95 closed 5 years ago

zhounan95 commented 5 years ago

Traceback (most recent call last): File "/home/zhounan/PycharmProjects/deeplab/DeeplabV3Plus-Keras-Retraining-master/train.py", line 80, in initial_epoch=0) File "/home/zhounan/anaconda3/envs/py35/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/home/zhounan/anaconda3/envs/py35/lib/python3.5/site-packages/keras/engine/training.py", line 2230, in fit_generator class_weight=class_weight) File "/home/zhounan/anaconda3/envs/py35/lib/python3.5/site-packages/keras/engine/training.py", line 1877, in train_on_batch class_weight=class_weight) File "/home/zhounan/anaconda3/envs/py35/lib/python3.5/site-packages/keras/engine/training.py", line 1480, in _standardize_user_data exception_prefix='target') File "/home/zhounan/anaconda3/envs/py35/lib/python3.5/site-packages/keras/engine/training.py", line 123, in _standardize_input_data str(data_shape)) ValueError: Error when checking target: expected bilinear_upsampling_2 to have shape (512, 512, 1) but got array with shape (512, 512, 3)

Process finished with exit code 1

我输入的png图像报错维度不对,bilinear_upsampling_2这个网络中也没有呀,请问作者知道是什么情况呢

zhounan95 commented 5 years ago

如果按照(512,512,1)输入也会报错input_1期望输入为(512,512,1),好奇怪