class_docstr: Position encodings conform to the position encodings protocol.
class_docstr_tok: ["Position","encodings","conform","to","the","position","encodings","protocol","."]
code: def test_training(self, n, t, c):
      encoding = pe.SinCosPositionalEncoding()
      input_ntc = np.random.randn(n, t, c)
      encoding.init(input_ntc)
      output_ntc = encoding(input_ntc)
      self.assertEqual(output_ntc.shape, input_ntc.shape)
  
file_path: trax/trax/layers/research/position_encodings_test.py
imports: import functools
  import absl.testing.absltest
  import numpy
  import parameterized
  from trax import fastmath
  import trax.layers.research.position_encodings
label_desc: Use image node_id 1 for calling the SinCosEncodingsTest obj's underlying member method code with example usage: obj.test_training(n, t, c) without return types