MCPcopy Create free account
hub / github.com/apple/ml-pointersect / __init__

Method __init__

cdslib/core/nn/modules/vrnn.py:210–232  ·  view source on GitHub ↗

Create a Variational Recurrent Neural Network (VRNN) model. Args: param_dict: A :py:class:`ParamVRNN` object to define the hyper-parameters of the network. kwargs: If param_dict is None, you can directly provide keyword argume

(self, param_dict: ParamVRNN = None, **kwargs)

Source from the content-addressed store, hash-verified

208 """
209
210 def __init__(self, param_dict: ParamVRNN = None, **kwargs):
211 """
212 Create a Variational Recurrent Neural Network (VRNN) model.
213
214 Args:
215 param_dict:
216 A :py:class:`ParamVRNN` object to define the hyper-parameters of the network.
217 kwargs:
218 If param_dict is None, you can directly provide keyword arguments of :py:class:`ParamVRNN` here.
219 """
220 super().__init__()
221
222 # read and set configs
223 if param_dict is not None:
224 self.config_dict = ParamVRNN(**param_dict)
225 else:
226 self.config_dict = ParamVRNN(**kwargs)
227
228 for key in self.config_dict:
229 setattr(self, key, self.config_dict[key])
230
231 # construct sub-networks
232 self._construct_networks()
233
234 def _construct_networks(self):
235 """Construct the sub-networks.

Callers

nothing calls this directly

Calls 3

_construct_networksMethod · 0.95
ParamVRNNClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected