def call(self, inputs):
    # Workaround lack of ellipsis support.
    # pyformat: disable
    num_batch_axes = self._num_batch_axes(inputs.shape)
    batch_str = 'abcdefghijklm'[:num_batch_axes]
    contract_str = 'ABCDEFGHIJKLM'[:len(self.contract_shape)]
    output_str = 'nopqrstuvwxyz'[:len(self.filters)]
    # pyformat: enable
    einsum_str = '{}{},{}{}->{}{}'.format(batch_str, contract_str, contract_str,
                                          output_str, batch_str, output_str)
    result = tf.einsum(einsum_str, inputs, self.w)
    if self.use_bias:
      result += self.b
    if self.activation is not None:
      result = self.activation(result)
    return result