A deep learning training framework built with MoonBit, featuring tape-based autograd and PyTorch-like API (CPU backend)
chnlkw/moonxi-net does not have a README file
pub(open) trait BlasTensor {
fn matmul(Self, Self) -> Self
fn transpose(Self) -> Self
}pub(open) trait ImageBackwardOps {
fn conv2d_backward_data(grad_output : Self, weight : Self, input : Self, stride : Int, padding : Int) -> Self
fn conv2d_backward_weight(grad_output : Self, input : Self, weight : Self, stride : Int, padding : Int) -> Self
fn conv2d_backward_bias(grad_output : Self) -> Self
fn relu_backward(grad_output : Self, input : Self) -> Self
fn batchnorm_backward(grad_output : Self, input : Self, gamma : Self, save_mean : Self, save_inv_var : Self, eps : Float) -> (Self, Self, Self)
fn maxpool2d_backward(grad_output : Self, input : Self, kernel_size : Int, stride : Int) -> Self
fn adaptive_avg_pool2d_backward(grad_output : Self, input : Self) -> Self
fn softmax_ce_backward(logits : Self, targets : Self) -> Self
fn softmax_ce_backward_labels(logits : Self, labels : Self, num_classes : Int) -> Self
}pub(open) trait ImageTensor {
fn conv2d(Self, weight : Self, bias : Self, stride : Int, padding : Int) -> Self
fn relu(Self) -> Self
fn maxpool2d(Self, kernel_size : Int, stride : Int) -> Self
fn adaptive_avg_pool2d(Self, output_size : Int) -> Self
fn batchnorm_training(Self, gamma : Self, beta : Self, running_mean : Self, running_var : Self, momentum : Float, eps : Float) -> (Self, Self, Self)
fn batchnorm_inference(Self, gamma : Self, beta : Self, running_mean : Self, running_var : Self, eps : Float) -> Self
fn softmax_cross_entropy(Self, targets : Self) -> Self
fn cross_entropy_with_labels(Self, labels : Self, num_classes : Int) -> Self
}pub(open) trait Tensor {
fn dims(Self) -> FixedArray[Int]
fn zeros(dims : FixedArray[Int]) -> Self
fn zeros_like(Self) -> Self
fn from_host(data : FixedArray[Float], shape : Array[Int]) -> Self
fn square(Self) -> Self
fn sqrt(Self) -> Self
fn mean(Self) -> Self
fn scale(Self, Float) -> Self
fn mul_elem(Self, Self) -> Self
fn div_elem(Self, Self) -> Self
fn scalar(Float) -> Self
fn size(Self) -> Int
fn reduce_sum_to(Self, target_dims : FixedArray[Int]) -> Self
fn value(Self) -> TensorData
fn view(Self, new_shape : FixedArray[Int]) -> Self
fn add(Self, Self) -> Self
fn add_into(Self, Self) -> Unit
fn sub(Self, Self) -> Self
fn broadcast_to(Self, target_shape : FixedArray[Int]) -> Self
}impl BlasTensor for ShapeTensorimpl ImageBackwardOps for ShapeTensorfn batchnorm_backward(_grad_output : ShapeTensor, input : ShapeTensor, gamma : ShapeTensor, _save_mean : ShapeTensor, _save_inv_var : ShapeTensor, _eps : Float) -> (ShapeTensor, ShapeTensor, ShapeTensor)fn conv2d_backward_data(_grad_output : ShapeTensor, _weight : ShapeTensor, input : ShapeTensor, _stride : Int, _padding : Int) -> ShapeTensorfn conv2d_backward_weight(_grad_output : ShapeTensor, _input : ShapeTensor, weight : ShapeTensor, _stride : Int, _padding : Int) -> ShapeTensorfn maxpool2d_backward(_grad_output : ShapeTensor, input : ShapeTensor, _kernel_size : Int, _stride : Int) -> ShapeTensorfn softmax_ce_backward_labels(logits : ShapeTensor, _labels : ShapeTensor, _num_classes : Int) -> ShapeTensorimpl ImageTensor for ShapeTensorfn batchnorm_inference(input : ShapeTensor, _gamma : ShapeTensor, _beta : ShapeTensor, _running_mean : ShapeTensor, _running_var : ShapeTensor, _eps : Float) -> ShapeTensorfn batchnorm_training(input : ShapeTensor, _gamma : ShapeTensor, _beta : ShapeTensor, _running_mean : ShapeTensor, _running_var : ShapeTensor, _momentum : Float, _eps : Float) -> (ShapeTensor, ShapeTensor, ShapeTensor)fn conv2d(input : ShapeTensor, weight : ShapeTensor, bias : ShapeTensor, stride : Int, padding : Int) -> ShapeTensorfn cross_entropy_with_labels(_logits : ShapeTensor, _labels : ShapeTensor, _num_classes : Int) -> ShapeTensorimpl Tensor for ShapeTensorfn ShapeTensor::pool2d(self : ShapeTensor, kernel_size : Int, stride : Int, padding : Int) -> ShapeTensorInstall
Download zipA deep learning training framework built with MoonBit, featuring tape-based autograd and PyTorch-like API (CPU backend)