@@ -134,6 +134,7 @@ class ObjectiveFunction(object):
134
134
tf : :class:`TestFunction`
135
135
OPVI TestFunction
136
136
"""
137
+ __hash__ = id
137
138
138
139
def __init__ (self , op , tf ):
139
140
self .op = op
@@ -357,6 +358,7 @@ class Operator(object):
357
358
-----
358
359
For implementing Custom operator it is needed to define :func:`Operator.apply` method
359
360
"""
361
+ __hash__ = id
360
362
361
363
has_test_function = False
362
364
returns_loss = True
@@ -449,6 +451,8 @@ def collect_shared_to_list(params):
449
451
450
452
451
453
class TestFunction (object ):
454
+ __hash__ = id
455
+
452
456
def __init__ (self ):
453
457
self ._inited = False
454
458
self .shared_params = None
@@ -671,6 +675,7 @@ class Group(object):
671
675
- Kingma, D. P., & Welling, M. (2014).
672
676
`Auto-Encoding Variational Bayes. stat, 1050, 1. <https://arxiv.org/abs/1312.6114>`_
673
677
"""
678
+ __hash__ = id
674
679
# need to be defined in init
675
680
shared_params = None
676
681
symbolic_initial = None
@@ -1066,6 +1071,8 @@ class Approximation(object):
1066
1071
--------
1067
1072
See more info about :class:`Group` in it's docstring.
1068
1073
"""
1074
+ __hash__ = id
1075
+
1069
1076
def __init__ (self , groups , model = None ):
1070
1077
self ._scale_cost_to_minibatch = theano .shared (np .int8 (1 ))
1071
1078
model = modelcontext (model )
0 commit comments