abstract Learner.get_param_ref(param: torch.Tensor | tf.Variable) Hashable[source]#

Returns a hashable reference to a trainable parameter.

This should be overriden in framework specific specialization. For example in torch it will return the parameter itself, while in tf it returns the .ref() of the variable. The purpose is to retrieve a unique reference to the parameters.


param – The parameter to get the reference to.


A reference to the parameter.