public override float Loss(ComputeShader compute, Signal signal, Signal answer, bool train) { var predictSig = Predict(compute, signal, train); var softmaxSig = softmax.Forward(compute, predictSig, train); predictSig.Dispose(); return(CrossEntropyError.Loss(compute, softmaxSig, answer)); }
public SoftMaxLayer(int size) { _size = size; ErrorFunction = new CrossEntropyError <T>(); }