class AnyShapeEmbedding(Embedding):
'''
This Embedding works with inputs of any number of dimensions.
This can be accomplished by simply changing the output shape computation.
'''
#@overrides
def compute_output_shape(self, input_shape):
return input_shape + (self.output_dim,)
1 回答
我想这课程为Keras解决了: