Skip to content

nn.gates.loss #

fn mse_gate #

fn mse_gate[T](cache &autograd.Variable[T], target &vtl.Tensor[T]) &MseGate[T]

fn sigmoid_cross_entropy_gate #

fn sigmoid_cross_entropy_gate[T](cache &autograd.Variable[T], target &vtl.Tensor[T]) &SigmoidCrossEntropyGate[T]

fn softmax_cross_entropy_gate #

fn softmax_cross_entropy_gate[T](cache &autograd.Variable[T], target &vtl.Tensor[T]) &SoftmaxCrossEntropyGate[T]

fn (MseGate[T]) backward #

fn (g &MseGate[T]) backward[T](payload &autograd.Payload[T]) ![]&vtl.Tensor[T]

fn (MseGate[T]) cache #

fn (g &MseGate[T]) cache[T](mut result autograd.Variable[T], args ...autograd.CacheParam) !

fn (SigmoidCrossEntropyGate[T]) backward #

fn (g &SigmoidCrossEntropyGate[T]) backward[T](payload &autograd.Payload[T]) ![]&vtl.Tensor[T]

fn (SigmoidCrossEntropyGate[T]) cache #

fn (g &SigmoidCrossEntropyGate[T]) cache[T](mut result autograd.Variable[T], args ...autograd.CacheParam) !

fn (SoftmaxCrossEntropyGate[T]) backward #

fn (g &SoftmaxCrossEntropyGate[T]) backward[T](payload &autograd.Payload[T]) ![]&vtl.Tensor[T]

fn (SoftmaxCrossEntropyGate[T]) cache #

fn (g &SoftmaxCrossEntropyGate[T]) cache[T](mut result autograd.Variable[T], args ...autograd.CacheParam) !

struct MseGate #

struct MseGate[T] {
pub:
	cache  &autograd.Variable[T] = unsafe { nil }
	target &vtl.Tensor[T]        = unsafe { nil }
}

struct SigmoidCrossEntropyGate #

struct SigmoidCrossEntropyGate[T] {
pub:
	cache  &autograd.Variable[T] = unsafe { nil }
	target &vtl.Tensor[T]        = unsafe { nil }
}

struct SoftmaxCrossEntropyGate #

struct SoftmaxCrossEntropyGate[T] {
pub:
	cache  &autograd.Variable[T] = unsafe { nil }
	target &vtl.Tensor[T]        = unsafe { nil }
}