def tf_apply(self, x, internals, update, return_internals=False):
raise NotImplementedError<EOL>
Creates the TensorFlow operations for applying the network to the given input.

Args:
    x: Network input tensor or dict of input tensors.
    internals: List of prior internal state tensors
    update: Boolean tensor indicating whether this call happens during an update.
    return_internals: If true, also returns posterior internal state tensors

Returns:
    Network output tensor, plus optionally list of posterior internal state tensors