deepxde.nn¶
deepxde.nn.activations module¶
-
deepxde.nn.activations.
get
(identifier)[source]¶ Returns function.
Parameters: identifier – Function or string. Returns: Function corresponding to the input string or input function.
deepxde.nn.initializers module¶
-
deepxde.nn.initializers.
get
(identifier)[source]¶ Retrieve an initializer by the identifier.
Parameters: identifier – String that contains the initializer name or an initializer function. Returns: Initializer instance base on the input identifier.
-
class
deepxde.nn.initializers.
VarianceScalingStacked
(scale=1.0, mode='fan_in', distribution='truncated_normal', seed=None)[source]¶ Bases:
object
Initializer capable of adapting its scale to the shape of weights tensors.
With distribution=”truncated_normal” or “untruncated_normal”, samples are drawn from a truncated/untruncated normal distribution with a mean of zero and a standard deviation (after truncation, if used) stddev = sqrt(scale / n) where n is:
- number of input units in the weight tensor, if mode = “fan_in”
- number of output units, if mode = “fan_out”
- average of the numbers of input and output units, if mode = “fan_avg”
With distribution=”uniform”, samples are drawn from a uniform distribution within [-limit, limit], with limit = sqrt(3 * scale / n).
Parameters: - scale – Scaling factor (positive float).
- mode – One of “fan_in”, “fan_out”, “fan_avg”.
- distribution – Random distribution to use. One of “normal”, “uniform”.
- seed – A Python integer. Used to create random seeds. See tf.set_random_seed for behavior.
- dtype – Default data type, used if no dtype argument is provided when calling the initializer. Only floating point types are supported.
Raises: ValueError
– In case of an invalid value for the “scale”, mode” or “distribution” arguments.