Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def __init__(self, **kwargs):
- self.output_dim = K.placeholder(None)
- super(SumationLayer, self).__init__(**kwargs)
- def build(self, input_shape):
- # Create a trainable weight variable for this layer.
- self.kernel = self.add_weight(name='kernel',
- shape=(input_shape[1], self.output_dim),
- initializer='uniform',
- trainable=True)
- super(SumationLayer, self).build(input_shape) # Be sure to call this somewhere!
- self.output_dim = (input_shape[0], self.output_dim)
- def call(self, x):
- return x + self.kernel
- def compute_output_shape(self, input_shape):
- return (input_shape[0], self.output_dim)
- TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64
Add Comment
Please, Sign In to add comment