MCPcopy Create free account
hub / github.com/apple/axlearn / random_int_array

Function random_int_array

axlearn/common/text_dual_encoder_test.py:110–111  ·  view source on GitHub ↗
(*, shape: tuple)

Source from the content-addressed store, hash-verified

108
109
110def random_int_array(*, shape: tuple) -> Tensor:
111 return jax.random.randint(jax.random.PRNGKey(0), shape=shape, minval=1, maxval=VOCAB_SIZE)
112
113
114class TestTextEmbeddingStreamEncoder(TestCase):

Calls

no outgoing calls

Tested by

no test coverage detected