mxfusion.components.functions.gluon_func_eval

Members

class mxfusion.components.functions.gluon_func_eval.GluonFunctionEvaluation(func, input_variables, output_variables, broadcastable=False)

Bases: mxfusion.components.functions.function_evaluation.FunctionEvaluationWithParameters

The evaluation of a function that is a wrapper of a MXNet Gluon block.

Parameters:
  • func (MXFusion.components.functions.MXFusionGluonFunction) – the MXFusion wrapper of the MXNet Gluon block that the function evaluation is associated with.
  • input_variables ({str : Variable}) – the input arguments to the function.
  • output_variables ({str : Variable}) – the output variables of the function.
  • broadcastable – Whether the function supports broadcasting with the additional dimension for samples.
Type:

boolean

eval(F, variables, always_return_tuple=False)

The method handling the execution of the function. The inputs arguments of the function are fetched from the variables argument according to their UUIDs.

Parameters:
  • F – the MXNet computation mode (mxnet.symbol or mxnet.ndarray)
  • variables ({str(UUID): MXNet NDArray or MXNet Symbol}) – the set of MXNet arrays that holds the values of variables at runtime.
  • always_return_tuple – Whether return a tuple even if there is

only one variables in outputs. :type always_return_tuple: boolean :returns: the return value of the function :rtypes: MXNet NDArray or MXNet Symbol