

def call(self, x, mask=None):
    input_shape = self.input_spec[0].shape
    input_length = input_shape[1]
    if (not input_length):
        if hasattr(K, 'int_shape'):
            input_length = K.int_shape(x)[1]
            if (not input_length):
                raise Exception((('Layer ' + self.name) + ' requires to know the length of its input, but it could not be inferred automatically. Specify it manually by passing an input_shape argument to the first layer in your model.'))
        else:
            input_length = K.shape(x)[1]
    x = K.reshape(x, ((- 1), input_shape[(- 1)]))
    y = K.dot(x, self.W)
    if self.bias:
        y += self.b
    y = K.reshape(y, ((- 1), input_length, self.output_dim))
    y = self.activation(y)
    return y

dataset/ETHPy150Open fchollet/keras/keras/layers/core.py TimeDistributedDense.call/original