mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
add identity op (#1976)
This commit is contained in:

committed by
GitHub

parent
318cb82f16
commit
888c09a3db
@ -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:?}"),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user