add identity op (#1976)

This commit is contained in:
Mauro Sciancalepore
2024-04-01 12:08:25 +02:00
committed by GitHub
parent 318cb82f16
commit 888c09a3db

View File

@ -776,6 +776,11 @@ pub fn simple_eval(
let output = input.reshape(new_shape)?; let output = input.reshape(new_shape)?;
values.insert(node.output[0].clone(), output); 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:?}"), op_type => bail!("unsupported op_type {op_type} for op {node:?}"),
} }
} }