Address with 'param not None' case

pull/5683/head
peixu_ren 5 years ago
parent 290979853e
commit 21c663178c

@ -50,6 +50,8 @@ class Bijector(Cell):
self._parameters = {}
# parsing parameters
for k in param.keys():
if k == 'param':
continue
if not(k == 'self' or k.startswith('_')):
self._parameters[k] = param[k]
self._is_constant_jacobian = is_constant_jacobian

@ -35,6 +35,9 @@ class PowerTransform(Bijector):
Args:
power (int or float): scale factor. Default: 0.
name (str): name of the bijector. Default: 'PowerTransform'.
param (dict): parameters used to initialize the bijector. This is only used when other bijectors that inherits
from powertransform passing in parameters. In this case the derived bijector may overwrite the param args.
Default: None.
Examples:
>>> # To initialize a PowerTransform bijector of power 0.5

Loading…
Cancel
Save