renamed neuron trainable to trainableBias
This commit is contained in:
parent
1d80c4fec3
commit
0541a08c68
@ -245,10 +245,10 @@ namespace NanoBrain.Unity {
|
||||
neuron.bias = newBias;
|
||||
}
|
||||
|
||||
bool newTrainable = EditorGUILayout.Toggle("Trainable", neuron.trainable);
|
||||
if (newTrainable != neuron.trainable) {
|
||||
bool newTrainable = EditorGUILayout.Toggle("Trainable", neuron.trainableBias);
|
||||
if (newTrainable != neuron.trainableBias) {
|
||||
anythingChanged = true;
|
||||
neuron.trainable = newTrainable;
|
||||
neuron.trainableBias = newTrainable;
|
||||
}
|
||||
|
||||
EditorGUIUtility.labelWidth = previousLabelWidth;
|
||||
|
||||
@ -50,7 +50,7 @@ namespace NanoBrain {
|
||||
/// <summary>
|
||||
/// Indicator whether the bias can be trained
|
||||
/// </summary>
|
||||
public bool trainable = false;
|
||||
public bool trainableBias = false;
|
||||
|
||||
#region Synapses
|
||||
|
||||
@ -281,7 +281,7 @@ namespace NanoBrain {
|
||||
/// <param name="clone"></param>
|
||||
protected virtual void CloneFields(Neuron clone) {
|
||||
clone.bias = this.bias;
|
||||
clone.trainable = this.trainable;
|
||||
clone.trainableBias = this.trainableBias;
|
||||
clone.persistOutput = this.persistOutput;
|
||||
clone.combinator = this.combinator;
|
||||
clone.activator = this.activator;
|
||||
@ -678,7 +678,7 @@ namespace NanoBrain {
|
||||
synapse.BackPropagation(this, derivative, learningRate);
|
||||
|
||||
// Bias
|
||||
if (this.trainable) {
|
||||
if (this.trainableBias) {
|
||||
// This does not work well, because the derivative/error does not have a 3D direction
|
||||
// float3 biasDerivative = derivative; // dSSR/dActivator
|
||||
// switch (activator) { // dActivator/dBias
|
||||
@ -706,7 +706,7 @@ namespace NanoBrain {
|
||||
synapse.BackPropagation(this, derivative.magnitude, learningRate);
|
||||
|
||||
// Bias
|
||||
if (this.trainable) {
|
||||
if (this.trainableBias) {
|
||||
switch (this.activator) { // dActivator/dBias
|
||||
case ActivationType.Linear:
|
||||
derivative *= 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user