VarianceScaler class
Initializer that adapts its scale to tensors' shapes.
Generation depends on the distribution:
-
with Distribution.truncatedNormal or Distribution.unTruncatedNormal: tensor is sampled from corresponding distr with zero mean and
std = sqrt([scale] / n), wherencomputed according to the mode. -
with Distribution.uniform tensors sampled from uniform distr within
-k, k, wherek = sqrt(3 * [scale] / n)
- Implemented types
- Implementers
Constructors
- VarianceScaler({required double scale, required FanMode mode, required Distribution distribution, int? seed})
Properties
- distribution ↔ Distribution
-
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- mode ↔ FanMode
-
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale ↔ double
-
latefinal
- seed ↔ int?
-
getter/setter pair
Methods
-
call(
List< int> shape, DType dType) → Tensor -
Creates and returns Tensor of given
shapeanddTypeaccording to initializer logic.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
computeFans(
List< int> shape) → List<int> - Computes the number of input and output units for a weight shape.