Keras Reshape层报错
Traceback (most recent call last):
pcsel = Reshape((-1, 20, 30))(pcsel)
File "/home/xxx/anaconda3/envs/python36/lib/python3.6/site-packages/keras/engine/base_layer.py", line 458, in __call__
output_mask = self.compute_mask(inputs, previous_mask)
File "/home/xxx/anaconda3/envs/python36/lib/python3.6/site-packages/keras/engine/base_layer.py", line 616, in compute_mask
str(mask))
TypeError: Layer reshape_1 does not support masking, but was passed an input_mask: Tensor("concatenate_1/All:0", shape=(?, ?), dtype=bool)
解决方案:
I found it also works if you insert a Lambda layer before Reshape like this:
x = Lambda(lambda x: x, output_shape=lambda s:s)(x).
But the best thing I guess is to make some operations at this layer. Anyone has a good idea please shows here.