[INFO] cloning repository https://github.com/CodeMonkey2654/neuronix
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CodeMonkey2654/neuronix" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCodeMonkey2654%2Fneuronix", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCodeMonkey2654%2Fneuronix'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] 86c8a0119dd70aab02367c8955e647d05397f2cb
[INFO] checking CodeMonkey2654/neuronix against try#438eb4c1a1c3841523d7f672601e8adbe04cff28 for pr-147589-1
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCodeMonkey2654%2Fneuronix" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/CodeMonkey2654/neuronix
[INFO] finished tweaking git repo https://github.com/CodeMonkey2654/neuronix
[INFO] tweaked toml for git repo https://github.com/CodeMonkey2654/neuronix written to /workspace/builds/worker-6-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/CodeMonkey2654/neuronix on toolchain 438eb4c1a1c3841523d7f672601e8adbe04cff28
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/CodeMonkey2654/neuronix already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] cad8e87799d8e7d4eaecbcdfd0f9bbf13f16f9411e2816632ddf146d143be68f
[INFO] running `Command { std: "docker" "start" "-a" "cad8e87799d8e7d4eaecbcdfd0f9bbf13f16f9411e2816632ddf146d143be68f", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "cad8e87799d8e7d4eaecbcdfd0f9bbf13f16f9411e2816632ddf146d143be68f", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "cad8e87799d8e7d4eaecbcdfd0f9bbf13f16f9411e2816632ddf146d143be68f", kill_on_drop: false }`
[INFO] [stdout] cad8e87799d8e7d4eaecbcdfd0f9bbf13f16f9411e2816632ddf146d143be68f
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+438eb4c1a1c3841523d7f672601e8adbe04cff28" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 6a72e902dc7039651779c7dd7c4a56c7dd711216d4988c254fa7b9117ac23219
[INFO] running `Command { std: "docker" "start" "-a" "6a72e902dc7039651779c7dd7c4a56c7dd711216d4988c254fa7b9117ac23219", kill_on_drop: false }`
[INFO] [stderr]    Compiling num-traits v0.2.19
[INFO] [stderr]    Compiling libc v0.2.158
[INFO] [stderr]    Compiling matrixmultiply v0.3.9
[INFO] [stderr]    Compiling proc-macro2 v1.0.86
[INFO] [stderr]    Compiling quote v1.0.37
[INFO] [stderr]     Checking getrandom v0.2.15
[INFO] [stderr]    Compiling syn v2.0.77
[INFO] [stderr]     Checking rand_core v0.6.4
[INFO] [stderr]     Checking num-complex v0.4.6
[INFO] [stderr]     Checking num-integer v0.1.46
[INFO] [stderr]     Checking approx v0.5.1
[INFO] [stderr]     Checking ndarray v0.16.1
[INFO] [stderr]    Compiling zerocopy-derive v0.7.35
[INFO] [stderr]     Checking zerocopy v0.7.35
[INFO] [stderr]     Checking ppv-lite86 v0.2.20
[INFO] [stderr]     Checking rand_chacha v0.3.1
[INFO] [stderr]     Checking rand v0.8.5
[INFO] [stderr]     Checking rand_distr v0.4.3
[INFO] [stderr]     Checking ndarray-rand v0.15.0
[INFO] [stderr]     Checking rustf v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] error[E0599]: no method named `sum_axis` found for reference `&Tensor<f32>` in the current scope
[INFO] [stdout]   --> src/layer.rs:40:40
[INFO] [stdout]    |
[INFO] [stdout] 40 |         self.grad_biases = grad_output.sum_axis(0);
[INFO] [stdout]    |                                        ^^^^^^^^ method not found in `&Tensor<f32>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:65:30
[INFO] [stdout]    |
[INFO] [stdout] 65 |         ReLU { mask: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]    |                              ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]    |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]   --> src/tensor.rs:19:5
[INFO] [stdout]    |
[INFO] [stdout] 19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout] 27 | |     where
[INFO] [stdout] 28 | |         T: Zero,
[INFO] [stdout]    | |________________^
[INFO] [stdout] ...
[INFO] [stdout] 35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout] 36 | |     where
[INFO] [stdout] 37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]    | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout] 44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout] 45 | |     where
[INFO] [stdout] 46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]    | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]    |
[INFO] [stdout] 65 -         ReLU { mask: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 65 +         ReLU { mask: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: the method `gt` exists for reference `&Tensor<f32>`, but its trait bounds were not satisfied
[INFO] [stdout]   --> src/layer.rs:71:27
[INFO] [stdout]    |
[INFO] [stdout] 71 |         self.mask = input.gt(&Tensor::zeros_like(input));
[INFO] [stdout]    |                           ^^ method cannot be called on `&Tensor<f32>` due to unsatisfied trait bounds
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- doesn't satisfy `Tensor<f32>: Iterator` or `Tensor<f32>: PartialOrd<_>`
[INFO] [stdout]    |
[INFO] [stdout]    = note: the following trait bounds were not satisfied:
[INFO] [stdout]            `Tensor<f32>: PartialOrd<_>`
[INFO] [stdout]            which is required by `&Tensor<f32>: PartialOrd<&_>`
[INFO] [stdout]            `&Tensor<f32>: Iterator`
[INFO] [stdout]            which is required by `&mut &Tensor<f32>: Iterator`
[INFO] [stdout]            `Tensor<f32>: Iterator`
[INFO] [stdout]            which is required by `&mut Tensor<f32>: Iterator`
[INFO] [stdout] note: the trait `Iterator` must be implemented
[INFO] [stdout]   --> /rustc/438eb4c1a1c3841523d7f672601e8adbe04cff28/library/core/src/iter/traits/iterator.rs:40:1
[INFO] [stdout] help: consider annotating `Tensor<f32>` with `#[derive(PartialEq, PartialOrd)]`
[INFO] [stdout]   --> src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 + #[derive(PartialEq, PartialOrd)]
[INFO] [stdout] 11 | pub struct Tensor<T> {
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:71:39
[INFO] [stdout]    |
[INFO] [stdout] 71 |         self.mask = input.gt(&Tensor::zeros_like(input));
[INFO] [stdout]    |                                       ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]    |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]   --> src/tensor.rs:19:5
[INFO] [stdout]    |
[INFO] [stdout] 19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout] 27 | |     where
[INFO] [stdout] 28 | |         T: Zero,
[INFO] [stdout]    | |________________^
[INFO] [stdout] ...
[INFO] [stdout] 35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout] 36 | |     where
[INFO] [stdout] 37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]    | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout] 44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout] 45 | |     where
[INFO] [stdout] 46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]    | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]    |
[INFO] [stdout] 71 -         self.mask = input.gt(&Tensor::zeros_like(input));
[INFO] [stdout] 71 +         self.mask = input.gt(&Tensor::zeros(input));
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `sum_axis` found for reference `&Tensor<f32>` in the current scope
[INFO] [stdout]   --> src/layer.rs:40:40
[INFO] [stdout]    |
[INFO] [stdout] 40 |         self.grad_biases = grad_output.sum_axis(0);
[INFO] [stdout]    |                                        ^^^^^^^^ method not found in `&Tensor<f32>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:65:30
[INFO] [stdout]    |
[INFO] [stdout] 65 |         ReLU { mask: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]    |                              ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]    |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]   --> src/tensor.rs:19:5
[INFO] [stdout]    |
[INFO] [stdout] 19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout] 27 | |     where
[INFO] [stdout] 28 | |         T: Zero,
[INFO] [stdout]    | |________________^
[INFO] [stdout] ...
[INFO] [stdout] 35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout] 36 | |     where
[INFO] [stdout] 37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]    | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout] 44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout] 45 | |     where
[INFO] [stdout] 46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]    | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]    |
[INFO] [stdout] 65 -         ReLU { mask: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 65 +         ReLU { mask: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: the method `gt` exists for reference `&Tensor<f32>`, but its trait bounds were not satisfied
[INFO] [stdout]   --> src/layer.rs:71:27
[INFO] [stdout]    |
[INFO] [stdout] 71 |         self.mask = input.gt(&Tensor::zeros_like(input));
[INFO] [stdout]    |                           ^^ method cannot be called on `&Tensor<f32>` due to unsatisfied trait bounds
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- doesn't satisfy `Tensor<f32>: Iterator` or `Tensor<f32>: PartialOrd<_>`
[INFO] [stdout]    |
[INFO] [stdout]    = note: the following trait bounds were not satisfied:
[INFO] [stdout]            `Tensor<f32>: PartialOrd<_>`
[INFO] [stdout]            which is required by `&Tensor<f32>: PartialOrd<&_>`
[INFO] [stdout]            `&Tensor<f32>: Iterator`
[INFO] [stdout]            which is required by `&mut &Tensor<f32>: Iterator`
[INFO] [stdout]            `Tensor<f32>: Iterator`
[INFO] [stdout]            which is required by `&mut Tensor<f32>: Iterator`
[INFO] [stdout] note: the trait `Iterator` must be implemented
[INFO] [stdout]   --> /rustc/438eb4c1a1c3841523d7f672601e8adbe04cff28/library/core/src/iter/traits/iterator.rs:40:1
[INFO] [stdout] help: consider annotating `Tensor<f32>` with `#[derive(PartialEq, PartialOrd)]`
[INFO] [stdout]   --> src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 + #[derive(PartialEq, PartialOrd)]
[INFO] [stdout] 11 | pub struct Tensor<T> {
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:71:39
[INFO] [stdout]    |
[INFO] [stdout] 71 |         self.mask = input.gt(&Tensor::zeros_like(input));
[INFO] [stdout]    |                                       ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]    |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]   --> src/tensor.rs:19:5
[INFO] [stdout]    |
[INFO] [stdout] 19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout] 27 | |     where
[INFO] [stdout] 28 | |         T: Zero,
[INFO] [stdout]    | |________________^
[INFO] [stdout] ...
[INFO] [stdout] 35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout] 36 | |     where
[INFO] [stdout] 37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]    | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout] 44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout] 45 | |     where
[INFO] [stdout] 46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]    | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]    |
[INFO] [stdout] 71 -         self.mask = input.gt(&Tensor::zeros_like(input));
[INFO] [stdout] 71 +         self.mask = input.gt(&Tensor::zeros(input));
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `cast` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:72:27
[INFO] [stdout]    |
[INFO] [stdout] 72 |         input * self.mask.cast::<f32>()
[INFO] [stdout]    |                           ^^^^ method not found in `Tensor<bool>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- method `cast` not found for this struct
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `cast` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:76:33
[INFO] [stdout]    |
[INFO] [stdout] 76 |         grad_output * self.mask.cast::<f32>()
[INFO] [stdout]    |                                 ^^^^ method not found in `Tensor<bool>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- method `cast` not found for this struct
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `cast` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:72:27
[INFO] [stdout]    |
[INFO] [stdout] 72 |         input * self.mask.cast::<f32>()
[INFO] [stdout]    |                           ^^^^ method not found in `Tensor<bool>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- method `cast` not found for this struct
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:95:35
[INFO] [stdout]    |
[INFO] [stdout] 95 |         Sigmoid { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]    |                                   ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]    |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]   --> src/tensor.rs:19:5
[INFO] [stdout]    |
[INFO] [stdout] 19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout] 27 | |     where
[INFO] [stdout] 28 | |         T: Zero,
[INFO] [stdout]    | |________________^
[INFO] [stdout] ...
[INFO] [stdout] 35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout] 36 | |     where
[INFO] [stdout] 37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]    | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout] 44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout] 45 | |     where
[INFO] [stdout] 46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]    | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]    |
[INFO] [stdout] 95 -         Sigmoid { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 95 +         Sigmoid { output: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:101:36
[INFO] [stdout]     |
[INFO] [stdout] 101 |         self.output = 1.0 / (1.0 + (-input).exp());
[INFO] [stdout]     |                                    ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/layer.rs:101:23
[INFO] [stdout]     |
[INFO] [stdout] 101 |         self.output = 1.0 / (1.0 + (-input).exp());
[INFO] [stdout]     |         -----------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Tensor<f32>`, found floating-point number
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Tensor<f32>`
[INFO] [stdout]                  found type `{float}`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `cast` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:76:33
[INFO] [stdout]    |
[INFO] [stdout] 76 |         grad_output * self.mask.cast::<f32>()
[INFO] [stdout]    |                                 ^^^^ method not found in `Tensor<bool>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- method `cast` not found for this struct
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: cannot subtract `Tensor<f32>` from `{float}`
[INFO] [stdout]    --> src/layer.rs:106:45
[INFO] [stdout]     |
[INFO] [stdout] 106 |         let grad_input = grad_output * (1.0 - self.output.clone()) * self.output.clone();
[INFO] [stdout]     |                                             ^ no implementation for `{float} - Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout]     = help: the trait `Sub<Tensor<f32>>` is not implemented for `{float}`
[INFO] [stdout]     = help: the following other types implement trait `Sub<Rhs>`:
[INFO] [stdout]               `&f128` implements `Sub<f128>`
[INFO] [stdout]               `&f128` implements `Sub`
[INFO] [stdout]               `&f16` implements `Sub<f16>`
[INFO] [stdout]               `&f16` implements `Sub`
[INFO] [stdout]               `&f32` implements `Sub<&num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub<f32>`
[INFO] [stdout]               `&f32` implements `Sub<num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub`
[INFO] [stdout]             and 140 others
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot multiply `&Tensor<f32>` by `_`
[INFO] [stdout]    --> src/layer.rs:106:38
[INFO] [stdout]     |
[INFO] [stdout] 106 |         let grad_input = grad_output * (1.0 - self.output.clone()) * self.output.clone();
[INFO] [stdout]     |                          ----------- ^ --------------------------- _
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:126:32
[INFO] [stdout]     |
[INFO] [stdout] 126 |         Tanh { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 126 -         Tanh { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 126 +         Tanh { output: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:132:38
[INFO] [stdout]     |
[INFO] [stdout] 132 |         self.output = (input.exp() - (-input).exp()) / (input.exp() + (-input).exp());
[INFO] [stdout]     |                                      ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:132:71
[INFO] [stdout]     |
[INFO] [stdout] 132 |         self.output = (input.exp() - (-input).exp()) / (input.exp() + (-input).exp());
[INFO] [stdout]     |                                                                       ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]   --> src/layer.rs:95:35
[INFO] [stdout]    |
[INFO] [stdout] 95 |         Sigmoid { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]    |                                   ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]    |
[INFO] [stdout]   ::: src/tensor.rs:10:1
[INFO] [stdout]    |
[INFO] [stdout] 10 | pub struct Tensor<T> {
[INFO] [stdout]    | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]    |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]   --> src/tensor.rs:19:5
[INFO] [stdout]    |
[INFO] [stdout] 19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout] 27 | |     where
[INFO] [stdout] 28 | |         T: Zero,
[INFO] [stdout]    | |________________^
[INFO] [stdout] ...
[INFO] [stdout] 35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout] 36 | |     where
[INFO] [stdout] 37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]    | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout] 44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout] 45 | |     where
[INFO] [stdout] 46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]    | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]    |
[INFO] [stdout] 95 -         Sigmoid { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 95 +         Sigmoid { output: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]    |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:101:36
[INFO] [stdout]     |
[INFO] [stdout] 101 |         self.output = 1.0 / (1.0 + (-input).exp());
[INFO] [stdout]     |                                    ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: cannot subtract `Tensor<f32>` from `{float}`
[INFO] [stdout]    --> src/layer.rs:137:45
[INFO] [stdout]     |
[INFO] [stdout] 137 |         let grad_input = grad_output * (1.0 - self.output.clone() * self.output.clone());
[INFO] [stdout]     |                                             ^ no implementation for `{float} - Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout]     = help: the trait `Sub<Tensor<f32>>` is not implemented for `{float}`
[INFO] [stdout]     = help: the following other types implement trait `Sub<Rhs>`:
[INFO] [stdout]               `&f128` implements `Sub<f128>`
[INFO] [stdout]               `&f128` implements `Sub`
[INFO] [stdout]               `&f16` implements `Sub<f16>`
[INFO] [stdout]               `&f16` implements `Sub`
[INFO] [stdout]               `&f32` implements `Sub<&num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub<f32>`
[INFO] [stdout]               `&f32` implements `Sub<num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub`
[INFO] [stdout]             and 140 others
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot multiply `&Tensor<f32>` by `_`
[INFO] [stdout]    --> src/layer.rs:137:38
[INFO] [stdout]     |
[INFO] [stdout] 137 |         let grad_input = grad_output * (1.0 - self.output.clone() * self.output.clone());
[INFO] [stdout]     |                          ----------- ^ ------------------------------------------------- _
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/layer.rs:101:23
[INFO] [stdout]     |
[INFO] [stdout] 101 |         self.output = 1.0 / (1.0 + (-input).exp());
[INFO] [stdout]     |         -----------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Tensor<f32>`, found floating-point number
[INFO] [stdout]     |         |
[INFO] [stdout]     |         expected due to the type of this binding
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Tensor<f32>`
[INFO] [stdout]                  found type `{float}`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:158:35
[INFO] [stdout]     |
[INFO] [stdout] 158 |         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                   ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 158 -         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 158 +         Softmax { output: Tensor::zeros(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:158:84
[INFO] [stdout]     |
[INFO] [stdout] 158 |         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                                                                    ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 158 -         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 158 +         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:165:19
[INFO] [stdout]     |
[INFO] [stdout] 165 |         let exp = (-input).exp();
[INFO] [stdout]     |                   ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: cannot multiply `Tensor<f32>` by `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:171:84
[INFO] [stdout]     |
[INFO] [stdout] 171 |         let grad_input = self.output.clone() * (grad_output - (self.output.clone() * grad_output).sum_axis(1).expand_dims(1));
[INFO] [stdout]     |                                                                                    ^ no implementation for `Tensor<f32> * &Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout] help: the trait `Mul<&Tensor<f32>>` is not implemented for `Tensor<f32>`
[INFO] [stdout]    --> src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: consider dereferencing here
[INFO] [stdout]     |
[INFO] [stdout] 171 |         let grad_input = self.output.clone() * (grad_output - (self.output.clone() * *grad_output).sum_axis(1).expand_dims(1));
[INFO] [stdout]     |                                                                                      +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0282]: type annotations needed
[INFO] [stdout]    --> src/layer.rs:171:63
[INFO] [stdout]     |
[INFO] [stdout] 171 |         let grad_input = self.output.clone() * (grad_output - (self.output.clone() * grad_output).sum_axis(1).expand_dims(1));
[INFO] [stdout]     |                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:194:35
[INFO] [stdout]     |
[INFO] [stdout] 194 |         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                   ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 194 -         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 194 +         MSELoss { output: Tensor::zeros(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:194:84
[INFO] [stdout]     |
[INFO] [stdout] 194 |         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                                                                    ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 194 -         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 194 +         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot subtract `Tensor<f32>` from `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:200:30
[INFO] [stdout]     |
[INFO] [stdout] 200 |         self.output = (input - self.target).powi(2).mean();
[INFO] [stdout]     |                        ----- ^ ----------- Tensor<f32>
[INFO] [stdout]     |                        |
[INFO] [stdout]     |                        &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot subtract `Tensor<f32>` from `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:205:39
[INFO] [stdout]     |
[INFO] [stdout] 205 |         let grad_input = 2.0 * (input - self.target);
[INFO] [stdout]     |                                 ----- ^ ----------- Tensor<f32>
[INFO] [stdout]     |                                 |
[INFO] [stdout]     |                                 &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/layer.rs:206:9
[INFO] [stdout]     |
[INFO] [stdout] 204 |     fn backward(&mut self, input: &Tensor<f32>, grad_output: &Tensor<f32>) -> Tensor<f32> {
[INFO] [stdout]     |                                                                               ----------- expected `Tensor<f32>` because of return type
[INFO] [stdout] 205 |         let grad_input = 2.0 * (input - self.target);
[INFO] [stdout] 206 |         grad_input
[INFO] [stdout]     |         ^^^^^^^^^^ expected `Tensor<f32>`, found floating-point number
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Tensor<f32>`
[INFO] [stdout]                  found type `{float}`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: cannot subtract `Tensor<f32>` from `{float}`
[INFO] [stdout]    --> src/layer.rs:106:45
[INFO] [stdout]     |
[INFO] [stdout] 106 |         let grad_input = grad_output * (1.0 - self.output.clone()) * self.output.clone();
[INFO] [stdout]     |                                             ^ no implementation for `{float} - Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout]     = help: the trait `Sub<Tensor<f32>>` is not implemented for `{float}`
[INFO] [stdout]     = help: the following other types implement trait `Sub<Rhs>`:
[INFO] [stdout]               `&f128` implements `Sub<f128>`
[INFO] [stdout]               `&f128` implements `Sub`
[INFO] [stdout]               `&f16` implements `Sub<f16>`
[INFO] [stdout]               `&f16` implements `Sub`
[INFO] [stdout]               `&f32` implements `Sub<&num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub<f32>`
[INFO] [stdout]               `&f32` implements `Sub<num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub`
[INFO] [stdout]             and 140 others
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot multiply `&Tensor<f32>` by `_`
[INFO] [stdout]    --> src/layer.rs:106:38
[INFO] [stdout]     |
[INFO] [stdout] 106 |         let grad_input = grad_output * (1.0 - self.output.clone()) * self.output.clone();
[INFO] [stdout]     |                          ----------- ^ --------------------------- _
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:225:44
[INFO] [stdout]     |
[INFO] [stdout] 225 |         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                            ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 225 -         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 225 +         CrossEntropyLoss { output: Tensor::zeros(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:225:93
[INFO] [stdout]     |
[INFO] [stdout] 225 |         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                                                                             ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 225 -         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 225 +         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:126:32
[INFO] [stdout]     |
[INFO] [stdout] 126 |         Tanh { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 126 -         Tanh { output: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 126 +         Tanh { output: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:132:38
[INFO] [stdout]     |
[INFO] [stdout] 132 |         self.output = (input.exp() - (-input).exp()) / (input.exp() + (-input).exp());
[INFO] [stdout]     |                                      ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:132:71
[INFO] [stdout]     |
[INFO] [stdout] 132 |         self.output = (input.exp() - (-input).exp()) / (input.exp() + (-input).exp());
[INFO] [stdout]     |                                                                       ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `log_softmax` found for reference `&Tensor<f32>` in the current scope
[INFO] [stdout]    --> src/layer.rs:231:53
[INFO] [stdout]     |
[INFO] [stdout] 231 |         self.output = -self.target * (input - input.log_softmax()).sum_axis(1);
[INFO] [stdout]     |                                                     ^^^^^^^^^^^ method not found in `&Tensor<f32>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: cannot subtract `Tensor<f32>` from `{float}`
[INFO] [stdout]    --> src/layer.rs:137:45
[INFO] [stdout]     |
[INFO] [stdout] 137 |         let grad_input = grad_output * (1.0 - self.output.clone() * self.output.clone());
[INFO] [stdout]     |                                             ^ no implementation for `{float} - Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout]     = help: the trait `Sub<Tensor<f32>>` is not implemented for `{float}`
[INFO] [stdout]     = help: the following other types implement trait `Sub<Rhs>`:
[INFO] [stdout]               `&f128` implements `Sub<f128>`
[INFO] [stdout]               `&f128` implements `Sub`
[INFO] [stdout]               `&f16` implements `Sub<f16>`
[INFO] [stdout]               `&f16` implements `Sub`
[INFO] [stdout]               `&f32` implements `Sub<&num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub<f32>`
[INFO] [stdout]               `&f32` implements `Sub<num_complex::Complex<f32>>`
[INFO] [stdout]               `&f32` implements `Sub`
[INFO] [stdout]             and 140 others
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot multiply `&Tensor<f32>` by `_`
[INFO] [stdout]    --> src/layer.rs:137:38
[INFO] [stdout]     |
[INFO] [stdout] 137 |         let grad_input = grad_output * (1.0 - self.output.clone() * self.output.clone());
[INFO] [stdout]     |                          ----------- ^ ------------------------------------------------- _
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:158:35
[INFO] [stdout]     |
[INFO] [stdout] 158 |         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                   ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 158 -         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 158 +         Softmax { output: Tensor::zeros(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `sum_axis` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:231:68
[INFO] [stdout]     |
[INFO] [stdout] 231 |         self.output = -self.target * (input - input.log_softmax()).sum_axis(1);
[INFO] [stdout]     |                                                                    ^^^^^^^^ method not found in `Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- method `sum_axis` not found for this struct
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:158:84
[INFO] [stdout]     |
[INFO] [stdout] 158 |         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                                                                    ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 158 -         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 158 +         Softmax { output: Tensor::zeros_like(&Tensor::zeros(&[])), logits: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: the trait bound `f32: From<usize>` is not satisfied
[INFO] [stdout]    --> src/layer.rs:232:21
[INFO] [stdout]     |
[INFO] [stdout] 232 |         self.output.mean()
[INFO] [stdout]     |                     ^^^^ the trait `From<usize>` is not implemented for `f32`
[INFO] [stdout]     |
[INFO] [stdout]     = help: the following other types implement trait `From<T>`:
[INFO] [stdout]               `f32` implements `From<bool>`
[INFO] [stdout]               `f32` implements `From<i16>`
[INFO] [stdout]               `f32` implements `From<i8>`
[INFO] [stdout]               `f32` implements `From<u16>`
[INFO] [stdout]               `f32` implements `From<u8>`
[INFO] [stdout]               `f32` implements `From<zerocopy::byteorder::F32<O>>`
[INFO] [stdout] note: required by a bound in `Tensor::<T>::mean`
[INFO] [stdout]    --> src/tensor.rs:272:30
[INFO] [stdout]     |
[INFO] [stdout] 270 |     pub fn mean(&self) -> T
[INFO] [stdout]     |            ---- required by a bound in this associated function
[INFO] [stdout] 271 |     where
[INFO] [stdout] 272 |         T: Div<Output = T> + From<usize>,
[INFO] [stdout]     |                              ^^^^^^^^^^^ required by this bound in `Tensor::<T>::mean`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:165:19
[INFO] [stdout]     |
[INFO] [stdout] 165 |         let exp = (-input).exp();
[INFO] [stdout]     |                   ^^^^^^^^ cannot apply unary operator `-`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/layer.rs:232:9
[INFO] [stdout]     |
[INFO] [stdout] 230 |     fn forward(&self, input: &Tensor<f32>) -> Tensor<f32> {
[INFO] [stdout]     |                                               ----------- expected `Tensor<f32>` because of return type
[INFO] [stdout] 231 |         self.output = -self.target * (input - input.log_softmax()).sum_axis(1);
[INFO] [stdout] 232 |         self.output.mean()
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^ expected `Tensor<f32>`, found `f32`
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Tensor<f32>`
[INFO] [stdout]                  found type `f32`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot subtract `Tensor<f32>` from `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:236:32
[INFO] [stdout]     |
[INFO] [stdout] 236 |         let grad_input = input - self.target;
[INFO] [stdout]     |                          ----- ^ ----------- Tensor<f32>
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: cannot multiply `Tensor<f32>` by `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:171:84
[INFO] [stdout]     |
[INFO] [stdout] 171 |         let grad_input = self.output.clone() * (grad_output - (self.output.clone() * grad_output).sum_axis(1).expand_dims(1));
[INFO] [stdout]     |                                                                                    ^ no implementation for `Tensor<f32> * &Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout] help: the trait `Mul<&Tensor<f32>>` is not implemented for `Tensor<f32>`
[INFO] [stdout]    --> src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: consider dereferencing here
[INFO] [stdout]     |
[INFO] [stdout] 171 |         let grad_input = self.output.clone() * (grad_output - (self.output.clone() * *grad_output).sum_axis(1).expand_dims(1));
[INFO] [stdout]     |                                                                                      +
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0282]: type annotations needed
[INFO] [stdout]    --> src/layer.rs:171:63
[INFO] [stdout]     |
[INFO] [stdout] 171 |         let grad_input = self.output.clone() * (grad_output - (self.output.clone() * grad_output).sum_axis(1).expand_dims(1));
[INFO] [stdout]     |                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: arguments to this method are incorrect
[INFO] [stdout]   --> src/neural_network.rs:66:19
[INFO] [stdout]    |
[INFO] [stdout] 66 |         optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                   ^^^^
[INFO] [stdout]    |
[INFO] [stdout] note: expected `&mut [Tensor<f32>]`, found `&mut [&mut Tensor<f32>]`
[INFO] [stdout]   --> src/neural_network.rs:66:24
[INFO] [stdout]    |
[INFO] [stdout] 66 |         optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                        ^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected mutable reference `&mut [Tensor<f32>]`
[INFO] [stdout]               found mutable reference `&mut [&mut Tensor<f32>]`
[INFO] [stdout] note: expected `&[Tensor<f32>]`, found `&[&Tensor<f32>]`
[INFO] [stdout]   --> src/neural_network.rs:66:47
[INFO] [stdout]    |
[INFO] [stdout] 66 |         optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                                               ^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected reference `&[Tensor<f32>]`
[INFO] [stdout]               found reference `&[&Tensor<f32>]`
[INFO] [stdout] note: method defined here
[INFO] [stdout]   --> src/optimizer.rs:4:8
[INFO] [stdout]    |
[INFO] [stdout]  4 |     fn step(&mut self, params: &mut [Tensor<f32>], grads: &[Tensor<f32>]);
[INFO] [stdout]    |        ^^^^            ------                      -----
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:194:35
[INFO] [stdout]     |
[INFO] [stdout] 194 |         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                   ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 194 -         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 194 +         MSELoss { output: Tensor::zeros(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: arguments to this method are incorrect
[INFO] [stdout]   --> src/main.rs:36:15
[INFO] [stdout]    |
[INFO] [stdout] 36 |     optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |               ^^^^
[INFO] [stdout]    |
[INFO] [stdout] note: expected `&mut [Tensor<f32>]`, found `&mut [&mut Tensor<f32>]`
[INFO] [stdout]   --> src/main.rs:36:20
[INFO] [stdout]    |
[INFO] [stdout] 36 |     optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                    ^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected mutable reference `&mut [Tensor<f32>]`
[INFO] [stdout]               found mutable reference `&mut [&mut Tensor<f32>]`
[INFO] [stdout] note: expected `&[Tensor<f32>]`, found `&[&Tensor<f32>]`
[INFO] [stdout]   --> src/main.rs:36:43
[INFO] [stdout]    |
[INFO] [stdout] 36 |     optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                                           ^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected reference `&[Tensor<f32>]`
[INFO] [stdout]               found reference `&[&Tensor<f32>]`
[INFO] [stdout] note: method defined here
[INFO] [stdout]   --> src/optimizer.rs:4:8
[INFO] [stdout]    |
[INFO] [stdout]  4 |     fn step(&mut self, params: &mut [Tensor<f32>], grads: &[Tensor<f32>]);
[INFO] [stdout]    |        ^^^^            ------                      -----
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:194:84
[INFO] [stdout]     |
[INFO] [stdout] 194 |         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                                                                    ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 194 -         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 194 +         MSELoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot subtract `Tensor<f32>` from `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:200:30
[INFO] [stdout]     |
[INFO] [stdout] 200 |         self.output = (input - self.target).powi(2).mean();
[INFO] [stdout]     |                        ----- ^ ----------- Tensor<f32>
[INFO] [stdout]     |                        |
[INFO] [stdout]     |                        &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot subtract `Tensor<f32>` from `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:205:39
[INFO] [stdout]     |
[INFO] [stdout] 205 |         let grad_input = 2.0 * (input - self.target);
[INFO] [stdout]     |                                 ----- ^ ----------- Tensor<f32>
[INFO] [stdout]     |                                 |
[INFO] [stdout]     |                                 &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/layer.rs:206:9
[INFO] [stdout]     |
[INFO] [stdout] 204 |     fn backward(&mut self, input: &Tensor<f32>, grad_output: &Tensor<f32>) -> Tensor<f32> {
[INFO] [stdout]     |                                                                               ----------- expected `Tensor<f32>` because of return type
[INFO] [stdout] 205 |         let grad_input = 2.0 * (input - self.target);
[INFO] [stdout] 206 |         grad_input
[INFO] [stdout]     |         ^^^^^^^^^^ expected `Tensor<f32>`, found floating-point number
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Tensor<f32>`
[INFO] [stdout]                  found type `{float}`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:225:44
[INFO] [stdout]     |
[INFO] [stdout] 225 |         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                            ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 225 -         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 225 +         CrossEntropyLoss { output: Tensor::zeros(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0502]: cannot borrow `self.layers` as immutable because it is also borrowed as mutable
[INFO] [stdout]   --> src/neural_network.rs:47:35
[INFO] [stdout]    |
[INFO] [stdout] 40 |     pub fn get_params_and_grads(&mut self) -> (Vec<&mut Tensor<f32>>, Vec<&Tensor<f32>>) {
[INFO] [stdout]    |                                 - let's call the lifetime of this reference `'1`
[INFO] [stdout] ...
[INFO] [stdout] 44 |         for layer in &mut self.layers {
[INFO] [stdout]    |                      ---------------- mutable borrow occurs here
[INFO] [stdout] ...
[INFO] [stdout] 47 |         let layer_grads: Vec<_> = self.layers.iter().flat_map(|layer| layer.get_grads()).collect();
[INFO] [stdout]    |                                   ^^^^^^^^^^^ immutable borrow occurs here
[INFO] [stdout] ...
[INFO] [stdout] 50 |         (params, grads)
[INFO] [stdout]    |         --------------- returning this value requires that `self.layers` is borrowed for `'1`
[INFO] [stdout]    |
[INFO] [stdout] note: requirement that the value outlives `'1` introduced here
[INFO] [stdout]   --> /rustc/438eb4c1a1c3841523d7f672601e8adbe04cff28/library/core/src/iter/traits/collect.rs:413:31
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no function or associated item named `zeros_like` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:225:93
[INFO] [stdout]     |
[INFO] [stdout] 225 |         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout]     |                                                                                             ^^^^^^^^^^ function or associated item not found in `Tensor<_>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- function or associated item `zeros_like` not found for this struct
[INFO] [stdout]     |
[INFO] [stdout] note: if you're trying to build a new `Tensor<_>` consider using one of the following associated functions:
[INFO] [stdout]       Tensor::<T>::new
[INFO] [stdout]       Tensor::<T>::zeros
[INFO] [stdout]       Tensor::<T>::ones
[INFO] [stdout]       Tensor::<T>::rand
[INFO] [stdout]    --> src/tensor.rs:19:5
[INFO] [stdout]     |
[INFO] [stdout]  19 |       pub fn new(data: Vec<T>, shape: &[usize]) -> Self {
[INFO] [stdout]     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout]  26 | /     pub fn zeros(shape: &[usize]) -> Self
[INFO] [stdout]  27 | |     where
[INFO] [stdout]  28 | |         T: Zero,
[INFO] [stdout]     | |________________^
[INFO] [stdout] ...
[INFO] [stdout]  35 | /     pub fn ones(shape: &[usize]) -> Self
[INFO] [stdout]  36 | |     where
[INFO] [stdout]  37 | |         T: Default + Clone + From<u8>,
[INFO] [stdout]     | |______________________________________^
[INFO] [stdout] ...
[INFO] [stdout]  44 | /     pub fn rand(shape: &[usize], low: T, high: T) -> Self
[INFO] [stdout]  45 | |     where
[INFO] [stdout]  46 | |         T: rand::distributions::uniform::SampleUniform,
[INFO] [stdout]     | |_______________________________________________________^
[INFO] [stdout] help: there is an associated function `zeros` with a similar name
[INFO] [stdout]     |
[INFO] [stdout] 225 -         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros_like(&Tensor::zeros(&[])) }
[INFO] [stdout] 225 +         CrossEntropyLoss { output: Tensor::zeros_like(&Tensor::zeros(&[])), target: Tensor::zeros(&Tensor::zeros(&[])) }
[INFO] [stdout]     |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `log_softmax` found for reference `&Tensor<f32>` in the current scope
[INFO] [stdout]    --> src/layer.rs:231:53
[INFO] [stdout]     |
[INFO] [stdout] 231 |         self.output = -self.target * (input - input.log_softmax()).sum_axis(1);
[INFO] [stdout]     |                                                     ^^^^^^^^^^^ method not found in `&Tensor<f32>`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0277, E0282, E0308, E0369, E0502, E0599, E0600.
[INFO] [stdout] 
[INFO] [stdout] error[E0599]: no method named `sum_axis` found for struct `Tensor<T>` in the current scope
[INFO] [stdout]    --> src/layer.rs:231:68
[INFO] [stdout]     |
[INFO] [stdout] 231 |         self.output = -self.target * (input - input.log_softmax()).sum_axis(1);
[INFO] [stdout]     |                                                                    ^^^^^^^^ method not found in `Tensor<f32>`
[INFO] [stdout]     |
[INFO] [stdout]    ::: src/tensor.rs:10:1
[INFO] [stdout]     |
[INFO] [stdout]  10 | pub struct Tensor<T> {
[INFO] [stdout]     | -------------------- method `sum_axis` not found for this struct
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0277`.
[INFO] [stdout] 
[INFO] [stdout] error[E0277]: the trait bound `f32: From<usize>` is not satisfied
[INFO] [stdout]    --> src/layer.rs:232:21
[INFO] [stdout]     |
[INFO] [stdout] 232 |         self.output.mean()
[INFO] [stdout]     |                     ^^^^ the trait `From<usize>` is not implemented for `f32`
[INFO] [stdout]     |
[INFO] [stdout]     = help: the following other types implement trait `From<T>`:
[INFO] [stdout]               `f32` implements `From<bool>`
[INFO] [stdout]               `f32` implements `From<i16>`
[INFO] [stdout]               `f32` implements `From<i8>`
[INFO] [stdout]               `f32` implements `From<u16>`
[INFO] [stdout]               `f32` implements `From<u8>`
[INFO] [stdout]               `f32` implements `From<zerocopy::byteorder::F32<O>>`
[INFO] [stdout] note: required by a bound in `Tensor::<T>::mean`
[INFO] [stdout]    --> src/tensor.rs:272:30
[INFO] [stdout]     |
[INFO] [stdout] 270 |     pub fn mean(&self) -> T
[INFO] [stdout]     |            ---- required by a bound in this associated function
[INFO] [stdout] 271 |     where
[INFO] [stdout] 272 |         T: Div<Output = T> + From<usize>,
[INFO] [stdout]     |                              ^^^^^^^^^^^ required by this bound in `Tensor::<T>::mean`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> src/layer.rs:232:9
[INFO] [stdout]     |
[INFO] [stdout] 230 |     fn forward(&self, input: &Tensor<f32>) -> Tensor<f32> {
[INFO] [stdout]     |                                               ----------- expected `Tensor<f32>` because of return type
[INFO] [stdout] 231 |         self.output = -self.target * (input - input.log_softmax()).sum_axis(1);
[INFO] [stdout] 232 |         self.output.mean()
[INFO] [stdout]     |         ^^^^^^^^^^^^^^^^^^ expected `Tensor<f32>`, found `f32`
[INFO] [stdout]     |
[INFO] [stdout]     = note: expected struct `Tensor<f32>`
[INFO] [stdout]                  found type `f32`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0369]: cannot subtract `Tensor<f32>` from `&Tensor<f32>`
[INFO] [stdout]    --> src/layer.rs:236:32
[INFO] [stdout]     |
[INFO] [stdout] 236 |         let grad_input = input - self.target;
[INFO] [stdout]     |                          ----- ^ ----------- Tensor<f32>
[INFO] [stdout]     |                          |
[INFO] [stdout]     |                          &Tensor<f32>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `rustf` (bin "rustf") due to 36 previous errors
[INFO] [stdout] error[E0308]: arguments to this method are incorrect
[INFO] [stdout]   --> src/neural_network.rs:66:19
[INFO] [stdout]    |
[INFO] [stdout] 66 |         optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                   ^^^^
[INFO] [stdout]    |
[INFO] [stdout] note: expected `&mut [Tensor<f32>]`, found `&mut [&mut Tensor<f32>]`
[INFO] [stdout]   --> src/neural_network.rs:66:24
[INFO] [stdout]    |
[INFO] [stdout] 66 |         optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                        ^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected mutable reference `&mut [Tensor<f32>]`
[INFO] [stdout]               found mutable reference `&mut [&mut Tensor<f32>]`
[INFO] [stdout] note: expected `&[Tensor<f32>]`, found `&[&Tensor<f32>]`
[INFO] [stdout]   --> src/neural_network.rs:66:47
[INFO] [stdout]    |
[INFO] [stdout] 66 |         optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                                               ^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected reference `&[Tensor<f32>]`
[INFO] [stdout]               found reference `&[&Tensor<f32>]`
[INFO] [stdout] note: method defined here
[INFO] [stdout]   --> src/optimizer.rs:4:8
[INFO] [stdout]    |
[INFO] [stdout]  4 |     fn step(&mut self, params: &mut [Tensor<f32>], grads: &[Tensor<f32>]);
[INFO] [stdout]    |        ^^^^            ------                      -----
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] error[E0308]: arguments to this method are incorrect
[INFO] [stdout]   --> src/main.rs:36:15
[INFO] [stdout]    |
[INFO] [stdout] 36 |     optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |               ^^^^
[INFO] [stdout]    |
[INFO] [stdout] note: expected `&mut [Tensor<f32>]`, found `&mut [&mut Tensor<f32>]`
[INFO] [stdout]   --> src/main.rs:36:20
[INFO] [stdout]    |
[INFO] [stdout] 36 |     optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                    ^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected mutable reference `&mut [Tensor<f32>]`
[INFO] [stdout]               found mutable reference `&mut [&mut Tensor<f32>]`
[INFO] [stdout] note: expected `&[Tensor<f32>]`, found `&[&Tensor<f32>]`
[INFO] [stdout]   --> src/main.rs:36:43
[INFO] [stdout]    |
[INFO] [stdout] 36 |     optimizer.step(params.as_mut_slice(), grads.as_slice());
[INFO] [stdout]    |                                           ^^^^^^^^^^^^^^^^
[INFO] [stdout]    = note: expected reference `&[Tensor<f32>]`
[INFO] [stdout]               found reference `&[&Tensor<f32>]`
[INFO] [stdout] note: method defined here
[INFO] [stdout]   --> src/optimizer.rs:4:8
[INFO] [stdout]    |
[INFO] [stdout]  4 |     fn step(&mut self, params: &mut [Tensor<f32>], grads: &[Tensor<f32>]);
[INFO] [stdout]    |        ^^^^            ------                      -----
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0502]: cannot borrow `self.layers` as immutable because it is also borrowed as mutable
[INFO] [stdout]   --> src/neural_network.rs:47:35
[INFO] [stdout]    |
[INFO] [stdout] 40 |     pub fn get_params_and_grads(&mut self) -> (Vec<&mut Tensor<f32>>, Vec<&Tensor<f32>>) {
[INFO] [stdout]    |                                 - let's call the lifetime of this reference `'1`
[INFO] [stdout] ...
[INFO] [stdout] 44 |         for layer in &mut self.layers {
[INFO] [stdout]    |                      ---------------- mutable borrow occurs here
[INFO] [stdout] ...
[INFO] [stdout] 47 |         let layer_grads: Vec<_> = self.layers.iter().flat_map(|layer| layer.get_grads()).collect();
[INFO] [stdout]    |                                   ^^^^^^^^^^^ immutable borrow occurs here
[INFO] [stdout] ...
[INFO] [stdout] 50 |         (params, grads)
[INFO] [stdout]    |         --------------- returning this value requires that `self.layers` is borrowed for `'1`
[INFO] [stdout]    |
[INFO] [stdout] note: requirement that the value outlives `'1` introduced here
[INFO] [stdout]   --> /rustc/438eb4c1a1c3841523d7f672601e8adbe04cff28/library/core/src/iter/traits/collect.rs:413:31
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `rustf` (bin "rustf" test) due to 36 previous errors
[INFO] [stdout] Some errors have detailed explanations: E0277, E0282, E0308, E0369, E0502, E0599, E0600.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0277`.
[INFO] [stdout] 
[INFO] running `Command { std: "docker" "inspect" "6a72e902dc7039651779c7dd7c4a56c7dd711216d4988c254fa7b9117ac23219", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "6a72e902dc7039651779c7dd7c4a56c7dd711216d4988c254fa7b9117ac23219", kill_on_drop: false }`
[INFO] [stdout] 6a72e902dc7039651779c7dd7c4a56c7dd711216d4988c254fa7b9117ac23219
