fn dropout_gate[T](mask &vtl.Tensor[T], prob f64) &DropoutGate[T]
fn flatten_gate[T](input &autograd.Variable[T], cached_shape []int) &FlattenGate[T]
fn linear_gate[T](input &autograd.Variable[T], weight &autograd.Variable[T], bias &autograd.Variable[T]) &LinearGate[T]
fn maxpool2d_gate[T](max_indices &vtl.Tensor[int], kernel []int, shape []int, stride []int, padding []int) &MaxPool2DGate[T]
fn (DropoutGate[T]) backward #
fn (g &DropoutGate[T]) backward[T](payload &autograd.Payload[T]) ![]&vtl.Tensor[T]
fn (DropoutGate[T]) cache #
fn (g &DropoutGate[T]) cache[T](mut result autograd.Variable[T], args ...autograd.CacheParam) !
fn (FlattenGate[T]) backward #
fn (g &FlattenGate[T]) backward[T](payload &autograd.Payload[T]) ![]&vtl.Tensor[T]
fn (FlattenGate[T]) cache #
fn (g &FlattenGate[T]) cache[T](mut result autograd.Variable[T], args ...autograd.CacheParam) !
fn (LinearGate[T]) backward #
fn (g &LinearGate[T]) backward[T](payload &autograd.Payload[T]) ![]&vtl.Tensor[T]
fn (LinearGate[T]) cache #
fn (g &LinearGate[T]) cache[T](mut result autograd.Variable[T], args ...autograd.CacheParam) !
fn (MaxPool2DGate[T]) backward #
fn (g &MaxPool2DGate[T]) backward[T](payload &autograd.Payload[T]) ![]&vtl.Tensor[T]
fn (MaxPool2DGate[T]) cache #
fn (g &MaxPool2DGate[T]) cache[T](mut result autograd.Variable[T], args ...autograd.CacheParam) !
struct DropoutGate[T] {
pub:
prob f64
mask &vtl.Tensor[T] = unsafe { nil }
}
struct FlattenGate[T] {
pub:
input &autograd.Variable[T] = unsafe { nil }
cached_shape []int
}
struct LinearGate[T] {
pub:
input &autograd.Variable[T] = unsafe { nil }
weight &autograd.Variable[T] = unsafe { nil }
bias &autograd.Variable[T] = unsafe { nil }
}
struct MaxPool2DGate[T] {
pub:
max_indices &vtl.Tensor[int] = unsafe { nil }
kernel []int
shape []int
stride []int
padding []int
}