[INFO] cloning repository https://github.com/Palash90/iron_learn [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Palash90/iron_learn" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPalash90%2Firon_learn", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPalash90%2Firon_learn'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 39040c2bd46546db5765acc276b908b22ed2d6ae [INFO] checking Palash90/iron_learn against try#b6bca0d7327839b5e3f7a7779947cb9113d08917+rustflags=-Zstrict-projection-item-bounds for 150662-leaf [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPalash90%2Firon_learn" "/workspace/builds/worker-1-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc2/source'... [INFO] [stderr] done. [INFO] [stderr] Updating files: 67% (1132/1666) Updating files: 68% (1133/1666) Updating files: 69% (1150/1666) Updating files: 70% (1167/1666) Updating files: 71% (1183/1666) Updating files: 72% (1200/1666) Updating files: 73% (1217/1666) Updating files: 74% (1233/1666) Updating files: 75% (1250/1666) Updating files: 76% (1267/1666) Updating files: 77% (1283/1666) Updating files: 78% (1300/1666) Updating files: 79% (1317/1666) Updating files: 80% (1333/1666) Updating files: 81% (1350/1666) Updating files: 82% (1367/1666) Updating files: 83% (1383/1666) Updating files: 84% (1400/1666) Updating files: 85% (1417/1666) Updating files: 86% (1433/1666) Updating files: 87% (1450/1666) Updating files: 88% (1467/1666) Updating files: 89% (1483/1666) Updating files: 90% (1500/1666) Updating files: 91% (1517/1666) Updating files: 92% (1533/1666) Updating files: 92% (1543/1666) Updating files: 93% (1550/1666) Updating files: 94% (1567/1666) Updating files: 95% (1583/1666) Updating files: 96% (1600/1666) Updating files: 97% (1617/1666) Updating files: 98% (1633/1666) Updating files: 99% (1650/1666) Updating files: 100% (1666/1666) Updating files: 100% (1666/1666), done. [INFO] started tweaking git repo https://github.com/Palash90/iron_learn [INFO] finished tweaking git repo https://github.com/Palash90/iron_learn [INFO] tweaked toml for git repo https://github.com/Palash90/iron_learn written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Palash90/iron_learn on toolchain b6bca0d7327839b5e3f7a7779947cb9113d08917 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b6bca0d7327839b5e3f7a7779947cb9113d08917" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Palash90/iron_learn 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" "+b6bca0d7327839b5e3f7a7779947cb9113d08917" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+b6bca0d7327839b5e3f7a7779947cb9113d08917" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0d46aa8cab119e990ad4ba05074c7fb21d9fba4f19ea3e6c16111f2ad7a9f5fc [INFO] running `Command { std: "docker" "start" "-a" "0d46aa8cab119e990ad4ba05074c7fb21d9fba4f19ea3e6c16111f2ad7a9f5fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0d46aa8cab119e990ad4ba05074c7fb21d9fba4f19ea3e6c16111f2ad7a9f5fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0d46aa8cab119e990ad4ba05074c7fb21d9fba4f19ea3e6c16111f2ad7a9f5fc", kill_on_drop: false }` [INFO] [stdout] 0d46aa8cab119e990ad4ba05074c7fb21d9fba4f19ea3e6c16111f2ad7a9f5fc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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 -Zstrict-projection-item-bounds" "-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+b6bca0d7327839b5e3f7a7779947cb9113d08917" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a772a16ec757e385b9ab06e18a896070bfb3082e8cbb16b385ce4f456e450514 [INFO] running `Command { std: "docker" "start" "-a" "a772a16ec757e385b9ab06e18a896070bfb3082e8cbb16b385ce4f456e450514", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Compiling zerocopy v0.8.30 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Compiling proc-macro2 v1.0.103 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Compiling winapi-build v0.1.1 [INFO] [stderr] Checking as-slice v0.2.1 [INFO] [stderr] Compiling av-scenechange v0.14.1 [INFO] [stderr] Compiling built v0.8.0 [INFO] [stderr] Checking core2 v0.4.0 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking y4m v0.8.0 [INFO] [stderr] Compiling kernel32-sys v0.2.2 [INFO] [stderr] Checking aligned v0.4.3 [INFO] [stderr] Compiling pastey v0.1.1 [INFO] [stderr] Checking quick-error v2.0.1 [INFO] [stderr] Checking winapi v0.2.8 [INFO] [stderr] Checking bitstream-io v4.9.0 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking imgref v1.12.0 [INFO] [stderr] Compiling noop_proc_macro v0.3.0 [INFO] [stderr] Checking zune-core v0.4.12 [INFO] [stderr] Checking new_debug_unreachable v1.0.6 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Checking avif-serialize v0.8.6 [INFO] [stderr] Compiling serde_json v1.0.117 [INFO] [stderr] Checking loop9 v0.1.5 [INFO] [stderr] Checking zune-jpeg v0.4.21 [INFO] [stderr] Checking rgb v0.8.52 [INFO] [stderr] Checking byteorder-lite v0.1.0 [INFO] [stderr] Compiling rav1e v0.8.1 [INFO] [stderr] Checking zune-core v0.5.0 [INFO] [stderr] Checking gif v0.14.1 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Checking png v0.18.0 [INFO] [stderr] Checking regex-syntax v0.3.9 [INFO] [stderr] Checking image-webp v0.2.4 [INFO] [stderr] Checking zune-jpeg v0.5.7 [INFO] [stderr] Checking utf8-ranges v0.1.3 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Checking linux-raw-sys v0.11.0 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling simd_helpers v0.1.0 [INFO] [stderr] Checking thread-id v2.0.0 [INFO] [stderr] Checking memchr v0.1.11 [INFO] [stderr] Checking aho-corasick v0.5.3 [INFO] [stderr] Checking thread_local v0.2.7 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking regex v0.1.80 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking pxfm v0.1.27 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking maybe-rayon v0.1.1 [INFO] [stderr] Checking tempfile v3.24.0 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Compiling zerocopy-derive v0.8.30 [INFO] [stderr] Compiling equator-macro v0.4.2 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling profiling-procmacros v1.0.17 [INFO] [stderr] Compiling arg_enum_proc_macro v0.3.4 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Compiling fax_derive v0.2.0 [INFO] [stderr] Compiling serde_derive v1.0.203 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking profiling v1.0.17 [INFO] [stderr] Checking fax v0.2.6 [INFO] [stderr] Checking equator v0.4.2 [INFO] [stderr] Checking aligned-vec v0.6.4 [INFO] [stderr] Checking v_frame v0.3.9 [INFO] [stderr] Checking av1-grain v0.2.5 [INFO] [stderr] Checking clap v4.5.53 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking exr v1.74.0 [INFO] [stderr] Checking tiff v0.10.3 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking rand_distr v0.5.1 [INFO] [stderr] Checking ravif v0.12.0 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking iron_learn v0.6.5 (/opt/rustwide/workdir) [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/gradient_descent.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 17 | let data_size = *(x.get_shape().first().ok_or("X must have a shape")?); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 17 - let data_size = *(x.get_shape().first().ok_or("X must have a shape")?); [INFO] [stdout] 17 + let data_size = *(>::get_shape(x).first().ok_or("X must have a shape")?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/linear_regression.rs:15:7 [INFO] [stdout] | [INFO] [stdout] 15 | x.matmul(w) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::matmul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::matmul` [INFO] [stdout] ... [INFO] [stdout] 91 | fn matmul(&self, rhs: &Self) -> Result; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 15 - x.matmul(w) [INFO] [stdout] 15 + >::matmul(x, w) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/linear_regression.rs:29:23 [INFO] [stdout] | [INFO] [stdout] 29 | let x_with_bias = add_bias_term(x)?; [INFO] [stdout] | ^^^^^^^^^^^^^ - type must be known at this point [INFO] [stdout] | | [INFO] [stdout] | cannot infer type of the type parameter `U` declared on the function `add_bias_term` [INFO] [stdout] | [INFO] [stdout] = note: cannot satisfy `T: Tensor<_>` [INFO] [stdout] help: the trait `Tensor` is implemented for `CpuTensor` [INFO] [stdout] --> src/cpu_tensor/mod.rs:433:1 [INFO] [stdout] | [INFO] [stdout] 433 | impl Tensor for CpuTensor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: required by a bound in `add_bias_term` [INFO] [stdout] --> src/commons.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn add_bias_term(x: &T) -> Result [INFO] [stdout] | ------------- required by a bound in this function [INFO] [stdout] 114 | where [INFO] [stdout] 115 | T: Tensor, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `add_bias_term` [INFO] [stdout] help: consider specifying the generic arguments [INFO] [stdout] | [INFO] [stdout] 29 | let x_with_bias = add_bias_term::(x)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/logistic_regression.rs:19:23 [INFO] [stdout] | [INFO] [stdout] 19 | let x_with_bias = add_bias_term(x)?; [INFO] [stdout] | ^^^^^^^^^^^^^ - type must be known at this point [INFO] [stdout] | | [INFO] [stdout] | cannot infer type of the type parameter `U` declared on the function `add_bias_term` [INFO] [stdout] | [INFO] [stdout] = note: cannot satisfy `T: Tensor<_>` [INFO] [stdout] help: the trait `Tensor` is implemented for `CpuTensor` [INFO] [stdout] --> src/cpu_tensor/mod.rs:433:1 [INFO] [stdout] | [INFO] [stdout] 433 | impl Tensor for CpuTensor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: required by a bound in `add_bias_term` [INFO] [stdout] --> src/commons.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn add_bias_term(x: &T) -> Result [INFO] [stdout] | ------------- required by a bound in this function [INFO] [stdout] 114 | where [INFO] [stdout] 115 | T: Tensor, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `add_bias_term` [INFO] [stdout] help: consider specifying the generic arguments [INFO] [stdout] | [INFO] [stdout] 19 | let x_with_bias = add_bias_term::(x)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `&_` [INFO] [stdout] --> src/regression/logistic_regression.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | .map(|i| if i.f64() >= 0.5 { D::one() } else { D::zero() }) [INFO] [stdout] | ^ - type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving this closure parameter an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 51 | .map(|i: &T| if i.f64() >= 0.5 { D::one() } else { D::zero() }) [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/gradient_descent.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 17 | let data_size = *(x.get_shape().first().ok_or("X must have a shape")?); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 17 - let data_size = *(x.get_shape().first().ok_or("X must have a shape")?); [INFO] [stdout] 17 + let data_size = *(>::get_shape(x).first().ok_or("X must have a shape")?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/linear_regression.rs:15:7 [INFO] [stdout] | [INFO] [stdout] 15 | x.matmul(w) [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::matmul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::matmul` [INFO] [stdout] ... [INFO] [stdout] 91 | fn matmul(&self, rhs: &Self) -> Result; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 15 - x.matmul(w) [INFO] [stdout] 15 + >::matmul(x, w) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/linear_regression.rs:29:23 [INFO] [stdout] | [INFO] [stdout] 29 | let x_with_bias = add_bias_term(x)?; [INFO] [stdout] | ^^^^^^^^^^^^^ - type must be known at this point [INFO] [stdout] | | [INFO] [stdout] | cannot infer type of the type parameter `U` declared on the function `add_bias_term` [INFO] [stdout] | [INFO] [stdout] = note: cannot satisfy `T: Tensor<_>` [INFO] [stdout] help: the trait `Tensor` is implemented for `CpuTensor` [INFO] [stdout] --> src/cpu_tensor/mod.rs:433:1 [INFO] [stdout] | [INFO] [stdout] 433 | impl Tensor for CpuTensor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: required by a bound in `add_bias_term` [INFO] [stdout] --> src/commons.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn add_bias_term(x: &T) -> Result [INFO] [stdout] | ------------- required by a bound in this function [INFO] [stdout] 114 | where [INFO] [stdout] 115 | T: Tensor, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `add_bias_term` [INFO] [stdout] help: consider specifying the generic arguments [INFO] [stdout] | [INFO] [stdout] 29 | let x_with_bias = add_bias_term::(x)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/regression/logistic_regression.rs:19:23 [INFO] [stdout] | [INFO] [stdout] 19 | let x_with_bias = add_bias_term(x)?; [INFO] [stdout] | ^^^^^^^^^^^^^ - type must be known at this point [INFO] [stdout] | | [INFO] [stdout] | cannot infer type of the type parameter `U` declared on the function `add_bias_term` [INFO] [stdout] | [INFO] [stdout] = note: cannot satisfy `T: Tensor<_>` [INFO] [stdout] help: the trait `Tensor` is implemented for `CpuTensor` [INFO] [stdout] --> src/cpu_tensor/mod.rs:433:1 [INFO] [stdout] | [INFO] [stdout] 433 | impl Tensor for CpuTensor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] note: required by a bound in `add_bias_term` [INFO] [stdout] --> src/commons.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn add_bias_term(x: &T) -> Result [INFO] [stdout] | ------------- required by a bound in this function [INFO] [stdout] 114 | where [INFO] [stdout] 115 | T: Tensor, [INFO] [stdout] | ^^^^^^^^^ required by this bound in `add_bias_term` [INFO] [stdout] help: consider specifying the generic arguments [INFO] [stdout] | [INFO] [stdout] 19 | let x_with_bias = add_bias_term::(x)?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `&_` [INFO] [stdout] --> src/regression/logistic_regression.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | .map(|i| if i.f64() >= 0.5 { D::one() } else { D::zero() }) [INFO] [stdout] | ^ - type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving this closure parameter an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 51 | .map(|i: &T| if i.f64() >= 0.5 { D::one() } else { D::zero() }) [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/regression/logistic_regression.rs:51:32 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn predict_logistic(x: &T, w: &T) -> Result [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 51 | .map(|i| if i.f64() >= 0.5 { D::one() } else { D::zero() }) [INFO] [stdout] | ^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/regression/logistic_regression.rs:51:32 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn predict_logistic(x: &T, w: &T) -> Result [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 51 | .map(|i| if i.f64() >= 0.5 { D::one() } else { D::zero() }) [INFO] [stdout] | ^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed for `examples::types::Data<_>` [INFO] [stdout] --> src/examples/regression.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let xy = [INFO] [stdout] | ^^ [INFO] [stdout] 34 | deserialize_data(data_path).map_err(|e| format!("Data deserialization error: {}", e))?; [INFO] [stdout] | --------------------------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `FloatingPoint` [INFO] [stdout] help: the following types implement trait `FloatingPoint` [INFO] [stdout] --> src/numeric.rs:419:1 [INFO] [stdout] | [INFO] [stdout] 419 | impl FloatingPoint for f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `f32` [INFO] [stdout] ... [INFO] [stdout] 463 | impl FloatingPoint for f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `f64` [INFO] [stdout] note: required by a bound in `deserialize_data` [INFO] [stdout] --> src/examples/read_file.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn deserialize_data(data_path: &str) -> Result, serde_json::Error> [INFO] [stdout] | ---------------- required by a bound in this function [INFO] [stdout] 12 | where [INFO] [stdout] 13 | D: FloatingPoint, [INFO] [stdout] | ^^^^^^^^^^^^^ required by this bound in `deserialize_data` [INFO] [stdout] help: consider giving `xy` an explicit type, where the type for type parameter `D` is specified [INFO] [stdout] | [INFO] [stdout] 33 | let xy: examples::types::Data = [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed for `examples::types::Data<_>` [INFO] [stdout] --> src/examples/regression.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let xy = [INFO] [stdout] | ^^ [INFO] [stdout] 34 | deserialize_data(data_path).map_err(|e| format!("Data deserialization error: {}", e))?; [INFO] [stdout] | --------------------------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `FloatingPoint` [INFO] [stdout] help: the following types implement trait `FloatingPoint` [INFO] [stdout] --> src/numeric.rs:419:1 [INFO] [stdout] | [INFO] [stdout] 419 | impl FloatingPoint for f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `f32` [INFO] [stdout] ... [INFO] [stdout] 463 | impl FloatingPoint for f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `f64` [INFO] [stdout] note: required by a bound in `deserialize_data` [INFO] [stdout] --> src/examples/read_file.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn deserialize_data(data_path: &str) -> Result, serde_json::Error> [INFO] [stdout] | ---------------- required by a bound in this function [INFO] [stdout] 12 | where [INFO] [stdout] 13 | D: FloatingPoint, [INFO] [stdout] | ^^^^^^^^^^^^^ required by this bound in `deserialize_data` [INFO] [stdout] help: consider giving `xy` an explicit type, where the type for type parameter `D` is specified [INFO] [stdout] | [INFO] [stdout] 33 | let xy: examples::types::Data = [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/examples/regression.rs:143:12 [INFO] [stdout] | [INFO] [stdout] 143 | if (pred - actual).abs() < D::from_f64(1e-10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/examples/regression.rs:143:12 [INFO] [stdout] | [INFO] [stdout] 143 | if (pred - actual).abs() < D::from_f64(1e-10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `&_` [INFO] [stdout] --> src/examples/n_gram.rs:281:23 [INFO] [stdout] | [INFO] [stdout] 281 | .map(|val| (val.f64() / temparature).exp()) [INFO] [stdout] | ^^^ --- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving this closure parameter an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 281 | .map(|val: &T| (val.f64() / temparature).exp()) [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/n_gram.rs:281:41 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_n_gram_generator() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 281 | .map(|val| (val.f64() / temparature).exp()) [INFO] [stdout] | ^^^^^^^^^^^ expected type parameter `D`, found `f64` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `f64` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `&_` [INFO] [stdout] --> src/examples/n_gram.rs:281:23 [INFO] [stdout] | [INFO] [stdout] 281 | .map(|val| (val.f64() / temparature).exp()) [INFO] [stdout] | ^^^ --- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving this closure parameter an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 281 | .map(|val: &T| (val.f64() / temparature).exp()) [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/n_gram.rs:281:41 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_n_gram_generator() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 281 | .map(|val| (val.f64() / temparature).exp()) [INFO] [stdout] | ^^^^^^^^^^^ expected type parameter `D`, found `f64` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `f64` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/n_gram.rs:297:32 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_n_gram_generator() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 297 | if total_weight == 0.0 { [INFO] [stdout] | ^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/n_gram.rs:297:32 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_n_gram_generator() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 297 | if total_weight == 0.0 { [INFO] [stdout] | ^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `&_` [INFO] [stdout] --> src/examples/neural_net_runner.rs:137:31 [INFO] [stdout] | [INFO] [stdout] 137 | .map(|x| (x.f64() * 255.0) as u8) [INFO] [stdout] | ^ - type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving this closure parameter an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 137 | .map(|x: &T| (x.f64() * 255.0) as u8) [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/neural_net_runner.rs:137:45 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_neural_net() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 137 | .map(|x| (x.f64() * 255.0) as u8) [INFO] [stdout] | ^^^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `&_` [INFO] [stdout] --> src/examples/neural_net_runner.rs:137:31 [INFO] [stdout] | [INFO] [stdout] 137 | .map(|x| (x.f64() * 255.0) as u8) [INFO] [stdout] | ^ - type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving this closure parameter an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 137 | .map(|x: &T| (x.f64() * 255.0) as u8) [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/neural_net_runner.rs:137:45 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_neural_net() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 137 | .map(|x| (x.f64() * 255.0) as u8) [INFO] [stdout] | ^^^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/neural_net_runner.rs:189:33 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_neural_net() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 189 | .map(|x| (x.f64() * 255.0) as u8) [INFO] [stdout] | ^^^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/examples/neural_net_runner.rs:189:33 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn run_neural_net() -> Result<(), String> [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 189 | .map(|x| (x.f64() * 255.0) as u8) [INFO] [stdout] | ^^^^^ expected type parameter `D`, found floating-point number [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `{float}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/examples/transformer/mod.rs:247:17 [INFO] [stdout] | [INFO] [stdout] 247 | (p / temperature).exp().f32() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/examples/transformer/mod.rs:247:17 [INFO] [stdout] | [INFO] [stdout] 247 | (p / temperature).exp().f32() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/builder.rs:200:39 [INFO] [stdout] | [INFO] [stdout] 200 | let shape = v.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 200 - let shape = v.get_shape(); [INFO] [stdout] 200 + let shape = >::get_shape(&v); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/builder.rs:259:39 [INFO] [stdout] | [INFO] [stdout] 259 | weight_tensor.get_shape() [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 259 - weight_tensor.get_shape() [INFO] [stdout] 259 + >::get_shape(&weight_tensor) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/builder.rs:200:39 [INFO] [stdout] | [INFO] [stdout] 200 | let shape = v.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 200 - let shape = v.get_shape(); [INFO] [stdout] 200 + let shape = >::get_shape(&v); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:31:32 [INFO] [stdout] | [INFO] [stdout] 31 | let error_diff = predicted.sub(actual).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::sub` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::sub` [INFO] [stdout] ... [INFO] [stdout] 82 | fn sub(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 31 - let error_diff = predicted.sub(actual).unwrap(); [INFO] [stdout] 31 + let error_diff = >::sub(predicted, actual).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:44:20 [INFO] [stdout] | [INFO] [stdout] 44 | let n = actual.get_shape().iter().product(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 44 - let n = actual.get_shape().iter().product(); [INFO] [stdout] 44 + let n = >::get_shape(actual).iter().product(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | let shape = y_true.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 55 - let shape = y_true.get_shape(); [INFO] [stdout] 55 + let shape = >::get_shape(y_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | let shape = y_true.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 92 - let shape = y_true.get_shape(); [INFO] [stdout] 92 + let shape = >::get_shape(y_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/builder.rs:259:39 [INFO] [stdout] | [INFO] [stdout] 259 | weight_tensor.get_shape() [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 259 - weight_tensor.get_shape() [INFO] [stdout] 259 + >::get_shape(&weight_tensor) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:121:26 [INFO] [stdout] | [INFO] [stdout] 121 | let product = y_true.mul(&ln_pred).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::mul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::mul` [INFO] [stdout] ... [INFO] [stdout] 85 | fn mul(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 121 - let product = y_true.mul(&ln_pred).unwrap(); [INFO] [stdout] 121 + let product = >::mul(y_true, &ln_pred).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:139:24 [INFO] [stdout] | [INFO] [stdout] 139 | let shape = y_true.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 139 - let shape = y_true.get_shape(); [INFO] [stdout] 139 + let shape = >::get_shape(y_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:31:32 [INFO] [stdout] | [INFO] [stdout] 31 | let error_diff = predicted.sub(actual).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::sub` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::sub` [INFO] [stdout] ... [INFO] [stdout] 82 | fn sub(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 31 - let error_diff = predicted.sub(actual).unwrap(); [INFO] [stdout] 31 + let error_diff = >::sub(predicted, actual).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | let shape = input.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 17 - let shape = input.get_shape(); [INFO] [stdout] 17 + let shape = >::get_shape(input); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:44:20 [INFO] [stdout] | [INFO] [stdout] 44 | let n = actual.get_shape().iter().product(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 44 - let n = actual.get_shape().iter().product(); [INFO] [stdout] 44 + let n = >::get_shape(actual).iter().product(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:60:24 [INFO] [stdout] | [INFO] [stdout] 60 | let shape = scores.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 60 - let shape = scores.get_shape(); [INFO] [stdout] 60 + let shape = >::get_shape(scores); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | let shape = y_true.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 55 - let shape = y_true.get_shape(); [INFO] [stdout] 55 + let shape = >::get_shape(y_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | let shape = y_true.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 92 - let shape = y_true.get_shape(); [INFO] [stdout] 92 + let shape = >::get_shape(y_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `Vec<_>` [INFO] [stdout] --> src/nn/transformer.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | let indices = input.get_data(); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 203 | let token_idx = indices[b * input_seq_len + s].f32() as usize; [INFO] [stdout] | ------------------------------ type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `indices` an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 159 | let indices: Vec = input.get_data(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:121:26 [INFO] [stdout] | [INFO] [stdout] 121 | let product = y_true.mul(&ln_pred).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::mul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::mul` [INFO] [stdout] ... [INFO] [stdout] 85 | fn mul(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 121 - let product = y_true.mul(&ln_pred).unwrap(); [INFO] [stdout] 121 + let product = >::mul(y_true, &ln_pred).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/loss_functions.rs:139:24 [INFO] [stdout] | [INFO] [stdout] 139 | let shape = y_true.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 139 - let shape = y_true.get_shape(); [INFO] [stdout] 139 + let shape = >::get_shape(y_true); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:204:43 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 204 | let w_start = token_idx * d; [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | let shape = input.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 17 - let shape = input.get_shape(); [INFO] [stdout] 17 + let shape = >::get_shape(input); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:60:24 [INFO] [stdout] | [INFO] [stdout] 60 | let shape = scores.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 60 - let shape = scores.get_shape(); [INFO] [stdout] 60 + let shape = >::get_shape(scores); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:205:61 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 205 | let word_slice = &word_w[w_start..w_start + d]; [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `Vec<_>` [INFO] [stdout] --> src/nn/transformer.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | let indices = input.get_data(); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 239 | let token_idx = indices[b * seq_len + s].f32() as usize; [INFO] [stdout] | ------------------------ type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `indices` an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 225 | let indices: Vec = input.get_data(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `Vec<_>` [INFO] [stdout] --> src/nn/transformer.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | let indices = input.get_data(); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 203 | let token_idx = indices[b * input_seq_len + s].f32() as usize; [INFO] [stdout] | ------------------------------ type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `indices` an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 159 | let indices: Vec = input.get_data(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:248:43 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 248 | let w_start = token_idx * embed_dim; [INFO] [stdout] | ^^^^^^^^^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:251:48 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 251 | word_weight_data[w_start + i] = word_weight_data[w_start + i] - (grad * lr); [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:204:43 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 204 | let w_start = token_idx * d; [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:251:80 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 251 | word_weight_data[w_start + i] = word_weight_data[w_start + i] - (grad * lr); [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:205:61 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 205 | let word_slice = &word_w[w_start..w_start + d]; [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `Vec<_>` [INFO] [stdout] --> src/nn/transformer.rs:225:13 [INFO] [stdout] | [INFO] [stdout] 225 | let indices = input.get_data(); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 239 | let token_idx = indices[b * seq_len + s].f32() as usize; [INFO] [stdout] | ------------------------ type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `indices` an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 225 | let indices: Vec = input.get_data(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:275:13 [INFO] [stdout] | [INFO] [stdout] 275 | T::zeroes(self.word_weights.get_shape()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::zeroes` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::zeroes` [INFO] [stdout] ... [INFO] [stdout] 58 | fn zeroes(shape: &[u32]) -> Self; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:248:43 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 248 | let w_start = token_idx * embed_dim; [INFO] [stdout] | ^^^^^^^^^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:251:48 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 251 | word_weight_data[w_start + i] = word_weight_data[w_start + i] - (grad * lr); [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/nn/transformer.rs:251:80 [INFO] [stdout] | [INFO] [stdout] 149 | impl Layer for CombinedEmbedding [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 251 | word_weight_data[w_start + i] = word_weight_data[w_start + i] - (grad * lr); [INFO] [stdout] | ^ expected type parameter `D`, found `usize` [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `D` [INFO] [stdout] found type `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:275:13 [INFO] [stdout] | [INFO] [stdout] 275 | T::zeroes(self.word_weights.get_shape()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::zeroes` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::zeroes` [INFO] [stdout] ... [INFO] [stdout] 58 | fn zeroes(shape: &[u32]) -> Self; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed for `Vec<_>` [INFO] [stdout] --> src/nn/transformer.rs:455:13 [INFO] [stdout] | [INFO] [stdout] 455 | let data = tensor.get_data(); [INFO] [stdout] | ^^^^ -------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_data` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_data` [INFO] [stdout] ... [INFO] [stdout] 71 | fn get_data(&self) -> Vec; [INFO] [stdout] | -------- required by a bound in this associated function [INFO] [stdout] help: consider giving `data` an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 455 | let data: Vec = tensor.get_data(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed for `Vec<_>` [INFO] [stdout] --> src/nn/transformer.rs:455:13 [INFO] [stdout] | [INFO] [stdout] 455 | let data = tensor.get_data(); [INFO] [stdout] | ^^^^ -------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_data` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_data` [INFO] [stdout] ... [INFO] [stdout] 71 | fn get_data(&self) -> Vec; [INFO] [stdout] | -------- required by a bound in this associated function [INFO] [stdout] help: consider giving `data` an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 455 | let data: Vec = tensor.get_data(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:518:29 [INFO] [stdout] | [INFO] [stdout] 518 | let batch_shape = q.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 518 - let batch_shape = q.get_shape(); [INFO] [stdout] 518 + let batch_shape = >::get_shape(&q); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:518:29 [INFO] [stdout] | [INFO] [stdout] 518 | let batch_shape = q.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 518 - let batch_shape = q.get_shape(); [INFO] [stdout] 518 + let batch_shape = >::get_shape(&q); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:647:43 [INFO] [stdout] | [INFO] [stdout] 647 | let d_x_after_attn = output_error.add(&d_ff1)?; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 647 - let d_x_after_attn = output_error.add(&d_ff1)?; [INFO] [stdout] 647 + let d_x_after_attn = >::add(output_error, &d_ff1)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/transformer.rs:647:43 [INFO] [stdout] | [INFO] [stdout] 647 | let d_x_after_attn = output_error.add(&d_ff1)?; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 647 - let d_x_after_attn = output_error.add(&d_ff1)?; [INFO] [stdout] 647 + let d_x_after_attn = >::add(output_error, &d_ff1)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:30:24 [INFO] [stdout] | [INFO] [stdout] 30 | |x: &T| Ok(T::zeroes(x.get_shape()).add(x).unwrap()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::zeroes` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::zeroes` [INFO] [stdout] ... [INFO] [stdout] 58 | fn zeroes(shape: &[u32]) -> Self; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | let one_minus_out = T::ones(output.get_shape()).sub(output)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::ones` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::ones` [INFO] [stdout] ... [INFO] [stdout] 61 | fn ones(shape: &[u32]) -> Self; [INFO] [stdout] | ---- required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:91:30 [INFO] [stdout] | [INFO] [stdout] 91 | let out_squared = output.mul(output)?; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::mul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::mul` [INFO] [stdout] ... [INFO] [stdout] 85 | fn mul(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 91 - let out_squared = output.mul(output)?; [INFO] [stdout] 91 + let out_squared = >::mul(output, output)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:30:24 [INFO] [stdout] | [INFO] [stdout] 30 | |x: &T| Ok(T::zeroes(x.get_shape()).add(x).unwrap()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::zeroes` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::zeroes` [INFO] [stdout] ... [INFO] [stdout] 58 | fn zeroes(shape: &[u32]) -> Self; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | let one_minus_out = T::ones(output.get_shape()).sub(output)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::ones` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::ones` [INFO] [stdout] ... [INFO] [stdout] 61 | fn ones(shape: &[u32]) -> Self; [INFO] [stdout] | ---- required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:124:23 [INFO] [stdout] | [INFO] [stdout] 124 | let shape = input.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 124 - let shape = input.get_shape(); [INFO] [stdout] 124 + let shape = >::get_shape(input); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:91:30 [INFO] [stdout] | [INFO] [stdout] 91 | let out_squared = output.mul(output)?; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::mul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::mul` [INFO] [stdout] ... [INFO] [stdout] 85 | fn mul(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 91 - let out_squared = output.mul(output)?; [INFO] [stdout] 91 + let out_squared = >::mul(output, output)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:160:8 [INFO] [stdout] | [INFO] [stdout] 160 | Ok(T::ones(output.get_shape())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::ones` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::ones` [INFO] [stdout] ... [INFO] [stdout] 61 | fn ones(shape: &[u32]) -> Self; [INFO] [stdout] | ---- required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:124:23 [INFO] [stdout] | [INFO] [stdout] 124 | let shape = input.get_shape(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 124 - let shape = input.get_shape(); [INFO] [stdout] 124 + let shape = >::get_shape(input); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/activations.rs:160:8 [INFO] [stdout] | [INFO] [stdout] 160 | Ok(T::ones(output.get_shape())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::ones` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::ones` [INFO] [stdout] ... [INFO] [stdout] 61 | fn ones(shape: &[u32]) -> Self; [INFO] [stdout] | ---- required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:130:43 [INFO] [stdout] | [INFO] [stdout] 130 | self.input_cache = Some(input.add(&T::zeroes(input.get_shape()))?); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 130 - self.input_cache = Some(input.add(&T::zeroes(input.get_shape()))?); [INFO] [stdout] 130 + self.input_cache = Some(>::add(input, &T::zeroes(input.get_shape()))?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:140:32 [INFO] [stdout] | [INFO] [stdout] 140 | let w_t = self.weights.t()?; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::t` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::t` [INFO] [stdout] ... [INFO] [stdout] 88 | fn t(&self) -> Result; [INFO] [stdout] | - required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 140 - let w_t = self.weights.t()?; [INFO] [stdout] 140 + let w_t = >::t(&self.weights)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:130:43 [INFO] [stdout] | [INFO] [stdout] 130 | self.input_cache = Some(input.add(&T::zeroes(input.get_shape()))?); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 130 - self.input_cache = Some(input.add(&T::zeroes(input.get_shape()))?); [INFO] [stdout] 130 + self.input_cache = Some(>::add(input, &T::zeroes(input.get_shape()))?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | T::zeroes(self.weights.get_shape()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::zeroes` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::zeroes` [INFO] [stdout] ... [INFO] [stdout] 58 | fn zeroes(shape: &[u32]) -> Self; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:217:45 [INFO] [stdout] | [INFO] [stdout] 217 | self.output_cache = Some(output.add(&T::zeroes(output.get_shape()))?); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 217 - self.output_cache = Some(output.add(&T::zeroes(output.get_shape()))?); [INFO] [stdout] 217 + self.output_cache = Some(>::add(&output, &T::zeroes(output.get_shape()))?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:140:32 [INFO] [stdout] | [INFO] [stdout] 140 | let w_t = self.weights.t()?; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::t` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::t` [INFO] [stdout] ... [INFO] [stdout] 88 | fn t(&self) -> Result; [INFO] [stdout] | - required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 140 - let w_t = self.weights.t()?; [INFO] [stdout] 140 + let w_t = >::t(&self.weights)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:234:15 [INFO] [stdout] | [INFO] [stdout] 234 | prime.mul(output_error) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::mul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::mul` [INFO] [stdout] ... [INFO] [stdout] 85 | fn mul(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 234 - prime.mul(output_error) [INFO] [stdout] 234 + >::mul(&prime, output_error) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | T::zeroes(self.weights.get_shape()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the trait `Tensor` [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::zeroes` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::zeroes` [INFO] [stdout] ... [INFO] [stdout] 58 | fn zeroes(shape: &[u32]) -> Self; [INFO] [stdout] | ------ required by a bound in this associated function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/neural_net.rs:76:32 [INFO] [stdout] | [INFO] [stdout] 76 | let mut output = input.add(&T::zeroes(input.get_shape())).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 76 - let mut output = input.add(&T::zeroes(input.get_shape())).unwrap(); [INFO] [stdout] 76 + let mut output = >::add(input, &T::zeroes(input.get_shape())).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:217:45 [INFO] [stdout] | [INFO] [stdout] 217 | self.output_cache = Some(output.add(&T::zeroes(output.get_shape()))?); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 217 - self.output_cache = Some(output.add(&T::zeroes(output.get_shape()))?); [INFO] [stdout] 217 + self.output_cache = Some(>::add(&output, &T::zeroes(output.get_shape()))?); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/layers.rs:234:15 [INFO] [stdout] | [INFO] [stdout] 234 | prime.mul(output_error) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::mul` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::mul` [INFO] [stdout] ... [INFO] [stdout] 85 | fn mul(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 234 - prime.mul(output_error) [INFO] [stdout] 234 + >::mul(&prime, output_error) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/neural_net.rs:76:32 [INFO] [stdout] | [INFO] [stdout] 76 | let mut output = input.add(&T::zeroes(input.get_shape())).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 76 - let mut output = input.add(&T::zeroes(input.get_shape())).unwrap(); [INFO] [stdout] 76 + let mut output = >::add(input, &T::zeroes(input.get_shape())).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/neural_net.rs:131:38 [INFO] [stdout] | [INFO] [stdout] 131 | let mut output = x_train.add(&T::zeroes(x_train.get_shape())).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 131 - let mut output = x_train.add(&T::zeroes(x_train.get_shape())).unwrap(); [INFO] [stdout] 131 + let mut output = >::add(x_train, &T::zeroes(x_train.get_shape())).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/neural_net.rs:131:38 [INFO] [stdout] | [INFO] [stdout] 131 | let mut output = x_train.add(&T::zeroes(x_train.get_shape())).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::add` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::add` [INFO] [stdout] ... [INFO] [stdout] 79 | fn add(&self, rhs: &Self) -> Result; [INFO] [stdout] | --- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 131 - let mut output = x_train.add(&T::zeroes(x_train.get_shape())).unwrap(); [INFO] [stdout] 131 + let mut output = >::add(x_train, &T::zeroes(x_train.get_shape())).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/neural_net.rs:212:57 [INFO] [stdout] | [INFO] [stdout] 212 | Some(wt) => (wt.get_data().to_vec(), wt.get_shape().to_vec()), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 212 - Some(wt) => (wt.get_data().to_vec(), wt.get_shape().to_vec()), [INFO] [stdout] 212 + Some(wt) => (wt.get_data().to_vec(), >::get_shape(&wt).to_vec()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/nn/neural_net.rs:212:57 [INFO] [stdout] | [INFO] [stdout] 212 | Some(wt) => (wt.get_data().to_vec(), wt.get_shape().to_vec()), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type must implement `Numeric` [INFO] [stdout] = help: the following types implement trait `Numeric`: [INFO] [stdout] Complex [INFO] [stdout] f32 [INFO] [stdout] f64 [INFO] [stdout] i128 [INFO] [stdout] i16 [INFO] [stdout] i32 [INFO] [stdout] i64 [INFO] [stdout] i8 [INFO] [stdout] and 7 others [INFO] [stdout] note: required by a bound in `Tensor::get_shape` [INFO] [stdout] --> src/tensor/mod.rs:38:21 [INFO] [stdout] | [INFO] [stdout] 38 | pub trait Tensor: Sized { [INFO] [stdout] | ^^^^^^^ required by this bound in `Tensor::get_shape` [INFO] [stdout] ... [INFO] [stdout] 68 | fn get_shape(&self) -> &Vec; [INFO] [stdout] | --------- required by a bound in this associated function [INFO] [stdout] help: try using a fully qualified path to specify the expected types [INFO] [stdout] | [INFO] [stdout] 212 - Some(wt) => (wt.get_data().to_vec(), wt.get_shape().to_vec()), [INFO] [stdout] 212 + Some(wt) => (wt.get_data().to_vec(), >::get_shape(&wt).to_vec()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0282, E0283, E0308. [INFO] [stdout] [INFO] [stderr] error: could not compile `iron_learn` (lib test) due to 49 previous errors [INFO] [stdout] For more information about an error, try `rustc --explain E0282`. [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] Some errors have detailed explanations: E0282, E0283, E0308. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0282`. [INFO] [stdout] [INFO] [stderr] error: could not compile `iron_learn` (lib) due to 49 previous errors [INFO] running `Command { std: "docker" "inspect" "a772a16ec757e385b9ab06e18a896070bfb3082e8cbb16b385ce4f456e450514", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a772a16ec757e385b9ab06e18a896070bfb3082e8cbb16b385ce4f456e450514", kill_on_drop: false }` [INFO] [stdout] a772a16ec757e385b9ab06e18a896070bfb3082e8cbb16b385ce4f456e450514