leftthomas / ImageDeblurring

A Keras implementation of image deblurring based on ICCV 2017 paper "Deep Generative Filter for motion deblurring"
82 stars 30 forks source link

AttributeError: 'int' object has no attribute 'ndim' #37

Closed SolicTous closed 3 years ago

SolicTous commented 3 years ago

epoch: 1 / 10 batches: 302 2020-11-12 12:18:02.225578: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2020-11-12 12:18:03.190597: W tensorflow/stream_executor/cuda/redzone_allocator.cc:312] Not found: ./bin/ptxas not found Relying on driver to perform ptx compilation. This message will be only logged once. 2020-11-12 12:18:03.252643: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0 Traceback (most recent call last): File "/home/developer/PycharmProjects/DeblurGAN-Keras-2/main.py", line 109, in train(batch_size=2, epoch_num=10) File "/home/developer/PycharmProjects/DeblurGAN-Keras-2/main.py", line 56, in train d_loss = d.train_on_batch(x, y) File "/home/developer/PycharmProjects/DeblurGAN-Keras/venv/lib/python3.7/site-packages/keras/engine/training.py", line 1843, in train_on_batch check_batch_axis=True) File "/home/developer/PycharmProjects/DeblurGAN-Keras/venv/lib/python3.7/site-packages/keras/engine/training.py", line 1430, in _standardize_user_data exception_prefix='target') File "/home/developer/PycharmProjects/DeblurGAN-Keras/venv/lib/python3.7/site-packages/keras/engine/training.py", line 70, in _standardize_input_data data = [np.expand_dims(x, 1) if x is not None and x.ndim == 1 else x for x in data] File "/home/developer/PycharmProjects/DeblurGAN-Keras/venv/lib/python3.7/site-packages/keras/engine/training.py", line 70, in data = [np.expand_dims(x, 1) if x is not None and x.ndim == 1 else x for x in data] AttributeError: 'int' object has no attribute 'ndim'

leftthomas commented 3 years ago

@artvizi you should use the old keras API

SolicTous commented 3 years ago

@artvizi you should use the old keras API

Really - thank you)