protected override void ConvertVariable(ComputeVariable _variable) { var variable = _variable as Variable.ActivationVariable; BatchCount = variable.BatchCount; InWidth = variable.InWidth; InHeight = variable.InHeight; InputChannels = variable.InputChannels; OutWidth = variable.OutWidth; OutHeight = variable.OutHeight; OutputChannels = variable.OutputChannels; InSize = variable.InSize; InArea = variable.InArea; InTotal = variable.InTotal; OutSize = variable.OutSize; OutArea = variable.OutArea; OutTotal = variable.OutTotal; ActivationType = variable.ActivationType; Input = variable.Input.Data; Output = variable.Output.Data; }
public void AddActivation(Utility.Types.Activator type = Utility.Types.Activator.ReLU) { int inw, inh, inch; GetLayerInputInfomation(out inw, out inh, out inch); AddLayer(new Layer.Activation(true) { Variable = new DedicatedFunction.Variable.ActivationVariable() { BatchCount = BatchCount, InputChannels = inch, InWidth = inw, InHeight = inh, ActivationType = type, }.Confirm(Instance), }.Confirm()); }