Create an Alex Graves' model. Args: param_dict: A :py:class:`ParamGraves` object to define the hyper-parameters of the network. kwargs: If param_dict is None, you can directly provide keyword arguments of :py:class:`ParamGraves` here.
(self, param_dict: ParamGraves = None, **kwargs)
| 196 | """ |
| 197 | |
| 198 | def __init__(self, param_dict: ParamGraves = None, **kwargs): |
| 199 | """Create an Alex Graves' model. |
| 200 | |
| 201 | Args: |
| 202 | param_dict: |
| 203 | A :py:class:`ParamGraves` object to define the hyper-parameters of the network. |
| 204 | kwargs: |
| 205 | If param_dict is None, you can directly provide keyword arguments of :py:class:`ParamGraves` here. |
| 206 | """ |
| 207 | super().__init__() |
| 208 | |
| 209 | # read and set configs |
| 210 | if param_dict is not None: |
| 211 | self.config_dict = ParamGraves(**param_dict) |
| 212 | else: |
| 213 | self.config_dict = ParamGraves(**kwargs) |
| 214 | |
| 215 | for key in self.config_dict: |
| 216 | setattr(self, key, self.config_dict[key]) |
| 217 | |
| 218 | # construct sub-networks |
| 219 | self._construct_networks() |
| 220 | |
| 221 | def _construct_networks(self): |
| 222 | """Construct the sub-networks. |
nothing calls this directly
no test coverage detected