Skip to content

Commit

Permalink
rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
nohzafk committed Jul 23, 2024
1 parent e6cf971 commit 2cf0667
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/iris.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import gleam/io
import gleam/list
import gleam/string
import iris_data
import malt0.{
import nested_tensor.{
type Block, type Hyperparameters, Block, accuracy, grid_search, init_theta,
l2_loss, model, relu, sampling_obj, stack_blocks, tensor,
}
Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions test/malt1_test.gleam → test/flat_tensor_test.gleam
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import gleam/bit_array
import gleam/bool
import gleam/dynamic.{type Dynamic}
import gleam/float
import gleam/int
import gleam/list
import gleam_community/maths/elementary.{exponential, natural_logarithm}
import gleeunit/should
import malt1.{
import flat_tensor.{
type Differentiable, type Dual, type Shape, type Tensor, Dual, DualDiff,
ListDiff, add_numeric, bitarray_to_floats, build_store, build_tensor, d_add,
d_divide, d_exp, d_expt, d_log, d_multiply, d_sqr, d_sqrt, d_subtract,
Expand All @@ -17,6 +9,14 @@ import malt1.{
tensor_equal, tlen, to_bitarray, to_diff, to_dual, to_tensor, tref, trefs,
unwrap_ok_number, unwrap_ok_number2,
}
import gleam/bit_array
import gleam/bool
import gleam/dynamic.{type Dynamic}
import gleam/float
import gleam/int
import gleam/list
import gleam_community/maths/elementary.{exponential, natural_logarithm}
import gleeunit/should

pub fn scalar1_shape(_) {
[]
Expand Down
2 changes: 1 addition & 1 deletion test/iris_test.gleam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gleam/io
import iris
import malt0
import nested_tensor
import qcheck_gleeunit_utils/test_spec
// only takes 10 seconds to run all the grid_search on M3 Max
// pub fn grid_search_test_() {
Expand Down
14 changes: 7 additions & 7 deletions test/malt0_test.gleam → test/nested_tensor_test.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import gleam/result
import gleam/string
import gleam_community/maths/combinatorics
import gleeunit/should
import malt0.{
import nested_tensor.{
type Scalar, type Tensor, type Theta, Block, ListTensor, Scalar, ScalarTensor,
accuracy, adam_gradient_descent, add_0_0, build_tensor,
build_tensor_from_tensors, compose_block_fns, corr, correlation_overlap,
desc_t, desc_u, dot_product, dotted_product, ext1, ext2, get_float, get_real,
get_scalar, gradient_descent, gradient_of, gradient_once, hp_new,
hp_new_batch_size, hp_new_beta, hp_new_mu, init_shape, k_recu, l2_loss,
build_tensor_from_tensors, cartesian_product, compose_block_fns, corr,
correlation_overlap, desc_t, desc_u, dot_product, dotted_product, ext1, ext2,
get_float, get_real, get_scalar, gradient_descent, gradient_of, gradient_once,
hp_new, hp_new_batch_size, hp_new_beta, hp_new_mu, init_shape, k_recu, l2_loss,
make_theta, map_tensor, map_tensor_recursively, multiply_0_0,
naked_gradient_descent, new_scalar, plane, rank, rectify, rectify_0, recu,
relu, rms_gradient_descent, samples, sampling_obj, shape, smooth, stack2,
Expand Down Expand Up @@ -1125,7 +1125,7 @@ pub fn cartesian_product_test() {
}),
)

malt0.cartesian_product([list1, list2, list3])
cartesian_product([list1, list2, list3])
|> should.equal(
[
#(500, 0.0001, 4),
Expand All @@ -1145,7 +1145,7 @@ pub fn cartesian_product_test() {

// The result will be a list of lists, each containing one element from each input list
let r =
malt0.cartesian_product([
cartesian_product([
[500, 1000] |> list.map(dynamic.from),
[0.0001, 0.0002] |> list.map(dynamic.from),
[4, 8] |> list.map(dynamic.from),
Expand Down

0 comments on commit 2cf0667

Please sign in to comment.