Comments (2)
As the error message says, the needed operator is not implemented now.
You can implement it by referencing other operator's implementation.
from webdnn.
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
from webdnn.
Related Issues (20)
- ONNX Support HOT 2
- Implement ONNX BatchNormalization
- Avoid memory error on default
- Update emscripten setup instruction
- how long will it support pytorch 1.0? HOT 2
- Does this run at all on Edge? HOT 3
- Question about writing my OPS HOT 4
- WebGL2 Compute shader support? HOT 2
- OpenNSFW caffe model always returns the same output HOT 3
- Support WebMetal HOT 1
- Support Chainer 5.x
- Full rename of WebGPU -> WebMetal
- obtain python framework model from webdnn HOT 1
- Does not work on iOS Safari without WebMetal enabled HOT 1
- How to use a TensorFlow 1.13.0 model with WebDNN?
- Support removal of Module.buffer in emscripten
- What the model is HOT 5
- error in webdnn setup command: "values of 'package_data' dict" must be a list of strings (got '*.js')
- Any one could explain the differences between "WebGL via Metal" vs. "WebGPU" on iOS? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdnn.