gluonts.mx.component module#
- gluonts.mx.component.equals_parameter_dict(this: ParameterDict, that: ParameterDict) bool[source]#
Structural equality check between two
ParameterDictobjects.Two parameter dictionaries
thisandthatare considered structurally equal if the following conditions are satisfied:They contain the same keys (modulo the key prefix which is stripped).
The data in the corresponding value pairs is equal, as defined by the
almost_equal()function (in this case we call the function withequal_nan=True, that is, two alignedNaNvalues are always considered equal).
Specializes
equals()for invocations where the first parameter is an instance of theParameterDictclass.- Parameters:
this – Objects to compare.
that – Objects to compare.
- Returns:
A boolean value indicating whether
thisandthatare structurally equal.- Return type:
bool
See also
equalsDispatching function.
- gluonts.mx.component.equals_representable_block(this: HybridBlock, that: HybridBlock) bool[source]#
Structural equality check between two
HybridBlockobjects withvalidated()initializers.Two blocks
thisandthatare considered structurally equal if all the conditions ofequals()are met, and in addition their parameter dictionaries obtained withcollect_params()are also structurally equal.Specializes
equals()for invocations where the first parameter is an instance of theHybridBlockclass.- Parameters:
this – Objects to compare.
that – Objects to compare.
- Returns:
A boolean value indicating whether
thisandthatare structurally equal.- Return type:
bool
See also
equalsDispatching function.
equals_parameter_dictSpecialization of
equals()for GluonParameterDictinput arguments.