def call(self, inputs, **kwargs):
    inputs_shape = inputs.shape.as_list()
    weights_shape = self.projection_weights.shape.as_list()
    assert (inputs_shape[(- 1)] == weights_shape[0])
    inputs = tf.reshape(inputs, [(- 1), inputs_shape[(- 1)]])
    outputs = tf.matmul(inputs, self.projection_weights)
    if (self.projection_biases is not None):
        outputs = tf.nn.bias_add(outputs, self.projection_biases)
    outputs_shape = inputs_shape
    outputs_shape[0] = (- 1)
    outputs_shape[(- 1)] = weights_shape[1]
    outputs = tf.reshape(outputs, outputs_shape)
    return outputs
def call(self, inputs, **kwargs):
    inputs_shape = inputs.shape.as_list()
    weights_shape = self.projection_weights.shape.as_list()
    assert (inputs_shape[(- 1)] == weights_shape[0])
    inputs = tf.reshape(inputs, [(- 1), inputs_shape[(- 1)]])
    outputs = tf.matmul(inputs, self.projection_weights)
    if (self.projection_biases is not None):
        outputs = tf.nn.bias_add(outputs, self.projection_biases)
    outputs_shape = inputs_shape
    outputs_shape[0] = (- 1)
    outputs_shape[(- 1)] = weights_shape[1]
    outputs = tf.reshape(outputs, outputs_shape)
    return outputs