(self, stack, layer, accelerated_fn, rng, step)
return stack, layer_inputs, layer_new_state
Run standard layer forward.
Run standard layer forward.
Run standard layer forward .
def _run_forward_standard(self, stack, layer, accelerated_fn, rng, step):
    """Run standard layer forward."""
    if step % self._n_steps_per_log == 1:
      logging.info('running forward standard layer %s', str(layer))
    layer_inputs = cb.inputs_from_stack(stack, layer.n_in)
    layer_weights = self._replicate(layer.weights)
    layer_state = self._replicate(layer.state)
    outputs, layer_new_state = accelerated_fn(
        layer_inputs, layer_weights, layer_state, rng)
    stack = cb.outputs_onto_stack(outputs, stack, layer.n_in)
    return stack, layer_inputs, layer_new_state
def _run_forward_standard ( self , stack , layer , accelerated_fn , rng , step ) : if step % self . _n_steps_per_log == 1 : logging . info ( 'running forward standard layer %s' , str ( layer ) ) layer_inputs = cb . inputs_from_stack ( stack , layer . n_in ) layer_weights = self . _replicate ( layer . weights ) layer_state = self . _replicate ( layer . state ) outputs , layer_new_state = accelerated_fn ( layer_inputs , layer_weights , layer_state , rng ) stack = cb . outputs_onto_stack ( outputs , stack , layer . n_in ) return stack , layer_inputs , layer_new_state