garage.tf.optimizers.utils module¶
Utilities for TensorFlow optimizers.
-
sliced_fun
(f, n_slices)[source]¶ Divide function f’s inputs into several slices.
Evaluate f on those slices, and then average the result. It is useful when memory is not enough to process all data at once. Assume: 1. each of f’s inputs is iterable and composed of multiple “samples” 2. outputs can be averaged over “samples”