plaidml / onnx-plaidml

An ONNX backend using PlaidML
GNU Affero General Public License v3.0
28 stars 8 forks source link

Upsample" is not implemented by the PlaidML ONNX backend #19

Open SleepProgger opened 5 years ago

SleepProgger commented 5 years ago

First of all: thanks for plaidm, big fan of plaidml-keras.

I am trying to load a model i exported from pytorch (2d model from https://github.com/1adrianb/face-alignment). After downgrading to pytorch 0.4.1, because onnx-plaidml doesn't support the current model 9 which pytorch.onnx.export currently provides, i now run into this error:

Traceback:
Traceback (most recent call last):
 File "/align/_base.py", line 91, in run
 self.align(*args, **kwargs)
 File "/align/fan.py", line 52, in align
 super().align(*args, **kwargs)
 File "/align/_base.py", line 81, in align
 self.initialize(*args, **kwargs)
 File "/align/fan.py", line 45, in initialize
 self.model = FAN(self.model_path, ratio=tf_ratio)
 File "/align/fan.py", line 221, in __init__
 self.graph = self.load_graph()
 File "/align/fan.py", line 236, in load_graph
 return onnx_plaidml.backend.prepare(model)
 File "/home/nope/.conda/envs/oxxn/lib/python3.7/site-packages/onnx_plaidml/backend.py", line 274, in prepare
 cls._apply_node(ops, node, bindings)
 File "/home/nope/.conda/envs/oxxn/lib/python3.7/site-packages/onnx_plaidml/backend.py", line 237, in _apply_node
 node.domain, node.op_type)), None)
 File "<string>", line 2, in raise_from
NotImplementedError: ""/"Upsample" is not implemented by the PlaidML ONNX backend

Any chance the "Upsample" layer could be implemented ?