raskr / rust-autograd

Tensors and differentiable operations (like TensorFlow) in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug for `g.argmax`

laocaoshilaocao opened this issue · comments

Hi, i am using ag.argmax method and i met a weird situation.

let test = g.constant(array![85.0, 16.0, 0.04, 85.0, 16.0, 85.0]);
let max_dis_index = g.argmax(test, 0, false).show_with("max_dis_index is");
g.eval(&[max_dis_index], &[]);

The output becomes 8.0 which is obviously wrong.

That happens when the maximum number has more than 2 times.

Fixed in #49