Skip to content

Commit

Permalink
Passed fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ulises-jeremias committed Dec 10, 2023
1 parent a12dee0 commit 660aac8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 34 deletions.
8 changes: 3 additions & 5 deletions datasets/imdb.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ module datasets
import vtl
import os

pub const (
imdb_folder_name = 'aclImdb'
imdb_file_name = '${imdb_folder_name}_v1.tar.gz'
imdb_base_url = 'http://ai.stanford.edu/~amaas/data/sentiment/'
)
pub const imdb_folder_name = 'aclImdb'
pub const imdb_file_name = '${imdb_folder_name}_v1.tar.gz'
pub const imdb_base_url = 'http://ai.stanford.edu/~amaas/data/sentiment/'

// ImdbDataset is a dataset for sentiment analysis.
pub struct ImdbDataset {
Expand Down
12 changes: 5 additions & 7 deletions datasets/mnist.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ module datasets
import vtl
import os

pub const (
mnist_base_url = 'http://yann.lecun.com/exdb/mnist/'
mnist_train_images_file = 'train-images-idx3-ubyte.gz'
mnist_train_labels_file = 'train-labels-idx1-ubyte.gz'
mnist_test_images_file = 't10k-images-idx3-ubyte.gz'
mnist_test_labels_file = 't10k-labels-idx1-ubyte.gz'
)
pub const mnist_base_url = 'http://yann.lecun.com/exdb/mnist/'
pub const mnist_train_images_file = 'train-images-idx3-ubyte.gz'
pub const mnist_train_labels_file = 'train-labels-idx1-ubyte.gz'
pub const mnist_test_images_file = 't10k-images-idx3-ubyte.gz'
pub const mnist_test_labels_file = 't10k-labels-idx1-ubyte.gz'

// MnistDataset is a dataset of MNIST handwritten digits.
pub struct MnistDataset {
Expand Down
8 changes: 3 additions & 5 deletions examples/nn_mnist/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import vtl.datasets
import vtl.nn.models
import vtl.nn.optimizers

const (
batch_size = 28
epochs = 1
batches = 100
)
const batch_size = 28
const epochs = 1
const batches = 100

fn main() {
// Autograd context / neuralnet graph
Expand Down
12 changes: 5 additions & 7 deletions examples/nn_simple_two_layer/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import vtl.autograd
import vtl.nn.models
import vtl.nn.optimizers

const (
batch_size = 64
input_dim = 1000
hidden_dim = 100
output_dim = 10
epochs = 500
)
const batch_size = 64
const input_dim = 1000
const hidden_dim = 100
const output_dim = 10
const epochs = 500

// Learning XOR function with a neural network.

Expand Down
8 changes: 3 additions & 5 deletions examples/nn_xor/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import vtl.autograd
import vtl.nn.models
import vtl.nn.optimizers

const (
batch_size = 32
epochs = 6
batches = 100
)
const batch_size = 32
const epochs = 6
const batches = 100

// Learning XOR function with a neural network.

Expand Down
8 changes: 3 additions & 5 deletions storage/cpu.v
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module storage

pub const (
vector_minimum_capacity = 2
vector_growth_factor = 2
vector_shrink_threshold = 1.0 / 4.0
)
pub const vector_minimum_capacity = 2
pub const vector_growth_factor = 2
pub const vector_shrink_threshold = 1.0 / 4.0

// CpuStorage
@[heap]
Expand Down

0 comments on commit 660aac8

Please sign in to comment.