You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i am a beginner of this interesting rust deep learning library.
When i try to run several basic examples using ndarray, i found that always has a compiler error saying i should use autograd::ndarray. Code and error are shown as follow:
ag::with(|g| {
let x = g.placeholder(&[-1,-1]);
let value = array![[1., 1.]];
println!("{:?}", x.eval(&[x.given(value.view())]).unwrap());
});
error[E0308]: mismatched types
--> src\main.rs:14:43
|
14 | println!("{:?}", x.eval(&[x.given(value.view())]).unwrap());
| ^^^^^^^^^^^^ expected struct `autograd::ndarray::ArrayBase`, found struct `ndarray::ArrayBase`
|
= note: expected struct `autograd::ndarray::ArrayBase<autograd::ndarray::ViewRepr<&_>, _>`
found struct `ndarray::ArrayBase<ndarray::ViewRepr<&{float}>, ndarray::Dim<[usize; 2]>>`
= note: perhaps two different versions of crate `ndarray` are being used?
Is that compulsory to use ag::ndarray::array![[1., 1.]] instead of array![[1., 1.]] in this kind of cases?
Thanks for your help.
The text was updated successfully, but these errors were encountered:
Hi, i am a beginner of this interesting rust deep learning library.
When i try to run several basic examples using
ndarray
, i found that always has a compiler error saying i should useautograd::ndarray
. Code and error are shown as follow:Is that compulsory to use
ag::ndarray::array![[1., 1.]]
instead ofarray![[1., 1.]]
in this kind of cases?Thanks for your help.
The text was updated successfully, but these errors were encountered: