Skip to content

Commit

Permalink
add identity op (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
masc-it authored Apr 1, 2024
1 parent 318cb82 commit 888c09a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions candle-onnx/src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,11 @@ pub fn simple_eval(
let output = input.reshape(new_shape)?;
values.insert(node.output[0].clone(), output);
}
// https://github.com/onnx/onnx/blob/main/docs/Operators.md#identity
"Identity" => {
let input = get(&node.input[0])?;
values.insert(node.output[0].clone(), input.clone());
}
op_type => bail!("unsupported op_type {op_type} for op {node:?}"),
}
}
Expand Down

0 comments on commit 888c09a

Please sign in to comment.