You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was using the SpatialPyramidPooling you wrote. Excellent works and Thanks.
But when I run the model with SpatialPyramidPooling, first time the shape including number sample is (32, 19567, 50), and it goes well. The second batch has shape (32, 7010, 50). And this is where the problem occurs.
--------- Error Message ---------
Traceback (most recent call last):
File "all_models_v2.py", line 755, in <module>
main()
File "all_models_v2.py", line 700, in main
model.fit_generator( generator=train_data_gen, steps_per_epoch=TRAIN_LENGTH //
BATCH_SIZE, epochs = 10, callbacks=[early_stopper], validation_data = val_data_gen,
validation_steps = VAL_LENGTH // BATCH_SIZE)
File "/home/k/shankai/app/anaconda2/lib/python2.7/site-
packages/keras/legacy/interfaces.py", line 88, in wrapper
return func(*args, **kwargs)
File "/home/k/shankai/app/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 1902, in fit_generator
class_weight=class_weight)
File "/home/k/shankai/app/anaconda2/lib/python2.7/site-packages/keras/engine/training.py", line 1642, in train_on_batch
outputs = self.train_function(ins)
File "/home/k/shankai/app/anaconda2/lib/python2.7/site-packages/keras/backend/theano_backend.py", line 1196, in __call__
return self.function(*inputs)
File "/home/k/shankai/app/anaconda2/lib/python2.7/site-packages/theano/compile/function_module.py", line 898, in __call__
storage_map=getattr(self.fn, 'storage_map', None))
File "/home/k/shankai/app/anaconda2/lib/python2.7/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/k/shankai/app/anaconda2/lib/python2.7/site-packages/theano/compile/function_module.py", line 884, in __call__
self.fn() if output_subset is None else\
ValueError: Input of CAReduce{maximum} has zero-size on axis 2
Apply node that caused the error: Reduce{maximum}{1, 2}(Reshape{4}.0)
Toposort index: 666
Inputs types: [TensorType(float32, 4D)]
Inputs shapes: [(32, 19564, 0, 1)]
Inputs strides: [(234768, 4, 4, 4)]
Inputs values: [array([], shape=(32, 19564, 0, 1), dtype=float32)]
Outputs clients: [[Join(TensorConstant{1}, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max, max), InplaceDimShuffle{0,x,x,1}(max)]]
I am using Theano backend of Keras. Ubuntu, since there is no reshape in my model except maybe in SpatialPyramidPooling. Following is my model:
Hi, I was using the SpatialPyramidPooling you wrote. Excellent works and Thanks.
But when I run the model with SpatialPyramidPooling, first time the shape including number sample is (32, 19567, 50), and it goes well. The second batch has shape (32, 7010, 50). And this is where the problem occurs.
--------- Error Message ---------
I am using Theano backend of Keras. Ubuntu, since there is no reshape in my model except maybe in SpatialPyramidPooling. Following is my model:
Thanks
The text was updated successfully, but these errors were encountered: