garage.tf.q_functions.q_function module

Q-function base classes without Parameterized.

class QFunction(name)[source]

Bases: abc.ABC

Q-function base class without Parameterzied.

Parameters:name (str) – Name of the Q-fucntion, also the variable scope.
clone(name)[source]

Return a clone of the Q-function.

It should only copy the configuration of the Q-function, not the parameters.

Parameters:name (str) – Name of the newly created q-function.
get_global_vars()[source]

Get all global variables under the QFunction scope.

get_qval_sym(*input_phs)[source]

Symbolic graph for q-network.

All derived classes should implement this function.

Parameters:input_phs (list[tf.Tensor]) – Recommended to be positional arguments, e.g. def get_qval_sym(self, state_input, action_input).
get_regularizable_vars()[source]

Get all network weight variables under the QFunction scope.

get_trainable_vars()[source]

Get all trainable variables under the QFunction scope.

log_diagnostics(paths)[source]

Log extra information per iteration based on the collected paths.