def test_decode_batch(self): with nn.stochastic(random.PRNGKey(0)): model = train.create_model() train.decode_batch(model, 5)
def test_decode_batch(self): key = random.PRNGKey(0) state = create_test_state() batch = train.get_batch(5) train.decode_batch(state.params, batch, key)
def test_decode_batch(self): key = random.PRNGKey(0) optimizer = create_test_optimizer() train.decode_batch(optimizer.target, 5, key)
def test_decode_batch(self): key = random.PRNGKey(0) optimizer = create_test_optimizer() batch, masks = train.get_batch(5) train.decode_batch(optimizer.target, batch, masks, key)