Skip to content
Permalink
Browse files

#4133 add .weightInit(Distribution) overload / convenience method

  • Loading branch information...
AlexDBlack committed Nov 27, 2017
1 parent 4e1321a commit 45cbb6efc2ad015397b4fdf5eac9d1e9dc70ac9c
@@ -820,6 +820,17 @@ public Builder weightInit(WeightInit weightInit) {
return this;
}

/**
* Set weight initialization scheme to random sampling via the specified distribution.
* Equivalent to: {@code .weightInit(WeightInit.DISTRIBUTION).dist(distribution)}
*
* @param distribution Distribution to use for weight initialization
*/
public Builder weightInit(Distribution distribution){
weightInit(WeightInit.DISTRIBUTION);
return dist(distribution);
}

/**
* Constant for bias initialization. Default: 0.0
*
@@ -159,6 +159,17 @@ public T weightInit(WeightInit weightInit) {
return (T) this;
}

/**
* Set weight initialization scheme to random sampling via the specified distribution.
* Equivalent to: {@code .weightInit(WeightInit.DISTRIBUTION).dist(distribution)}
*
* @param distribution Distribution to use for weight initialization
*/
public T weightInit(Distribution distribution){
weightInit(WeightInit.DISTRIBUTION);
return dist(distribution);
}

/**
* Bias initialization value, for layers with biases. Defaults to 0
*

0 comments on commit 45cbb6e

Please sign in to comment.
You can’t perform that action at this time.