We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking at the source i have this problem constantly showing up. I want to export a model from pytorch.
raise NotImplementedError("[ONNXConverter] Operator "Gather" is not supported yet.")
The text was updated successfully, but these errors were encountered:
As the error message says, the needed operator is not implemented now. You can implement it by referencing other operator's implementation.
Sorry, something went wrong.
Hi, thanks for the quick reply! Looking at the docs i found
`node = onnx.helper.make_node( 'Gather', inputs=['data', 'indices'], outputs=['y'], axis=1, ) data = np.random.randn(5, 4, 3, 2).astype(np.float32) indices = np.array([0, 1, 3]) y = np.take(data, indices, axis=1)
expect(node, inputs=[data, indices.astype(np.int64)], outputs=[y], name='test_gather_1')`
and came up with
` @ONNXConverter.register_handler("Gather") def _convert_gather(converter: ONNXConverter, onnx_op: INodeProto): x = converter.get_variable(onnx_op.input[0]) indices = converter.get_variable(onnx_op.input[1]) axis = onnx_op.attribute[0].i
new_data = x.data.copy().astype(np.float32) new_indices = indices.data.copy().astype(np.int64) y = np.take(new_data, new_indices , axis=axis) y = ConstantVariable(y, Order(y.shape)) converter.set_variable(onnx_op.output[0], y) `
what do you think? I now get dimensionalities error: ValueError: Unification failed: Number of dimension mismatch (self.ndim) = 2 (other.ndim) = 1
No branches or pull requests
Looking at the source i have this problem constantly showing up. I want to export a model from pytorch.
raise NotImplementedError("[ONNXConverter] Operator "Gather" is not supported yet.")
The text was updated successfully, but these errors were encountered: