d4nst/RotNet

input array from shape error

Closed this issue · 2 comments

imycc commented

input array from shape I use (640, 480, 3) and it always throw out can't into shape (480, 640, 3)
and when i use (480, 640, 3) and it throw out can't into shape (640,480,3)

How can i fix this problem?

I use Python3.5 and Keras 2.2.4

Traceback (most recent call last):
  File "train/train_pistachio.py", line 104, in <module>
    workers=10
  File "/usr/local/lib/python3.5/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 1418, in fit_generator
    initial_epoch=initial_epoch)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/training_generator.py", line 181, in fit_generator
    generator_output = next(output_generator)
  File "/usr/local/lib/python3.5/dist-packages/keras/utils/data_utils.py", line 601, in get
    six.reraise(*sys.exc_info())
  File "/usr/local/lib/python3.5/dist-packages/six.py", line 693, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/keras/utils/data_utils.py", line 595, in get
    inputs = self.queue.get(block=True).get()
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get
    raise self._value
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.5/dist-packages/keras/utils/data_utils.py", line 401, in get_index
    return _SHARED_SEQUENCES[uid][i]
  File "/usr/local/lib/python3.5/dist-packages/keras_preprocessing/image.py", line 1441, in __getitem__
    return self._get_batches_of_transformed_samples(index_array)
  File "/js/data/RotNet/utils.py", line 302, in _get_batches_of_transformed_samples
    batch_x[i] = rotated_image
ValueError: could not broadcast input array from shape (480,640,3) into shape (640,480,3)

d4nst commented

Please post a short code snippet or some sort of description of what you are doing, so that I can reproduce the error and help you.

Hello @imycc

did you solve this issue i have same issue??