- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
After trained and freez my network in the transformation step I have :
Model Optimizer version: 1.2.185.5335e231
[ ERROR ] List of operations that cannot be converted to IE IR:
[ ERROR ] Pow (16)
[ ERROR ] pow
[ ERROR ] pow_1
[ ERROR ] pow_2
[ ERROR ] pow_3
[ ERROR ] pow_4
[ ERROR ] pow_5
[ ERROR ] pow_6
[ ERROR ] pow_7
[ ERROR ] pow_8
[ ERROR ] pow_9
[ ERROR ] pow_10
[ ERROR ] pow_11
[ ERROR ] pow_12
[ ERROR ] pow_13
[ ERROR ] pow_14
[ ERROR ] pow_15
[ ERROR ] Part of the nodes was not translated to IE. Stopped.
So, my solution is to create extension file .py to overwrite the missing operation.
import networkx as nx
from mo.front.common.replacement import FrontReplacementOp
from mo.ops.power import Power
from mo.graph.graph import Node
class pow(FrontReplacementOp):op = "Pow"
enabled = Truedef replace_op(self, graph: nx.MultiDiGraph, node: Node):
p = Power(graph, dict(scale=2, name=node.name + '/pow_'))
out_node = p.create_node([node.in_node(0)])
return [out_node.id]
The file is execute and works.
Now, model Optimizer is able to create IR model, but the results are little bit different as my expectation.
Is this a right solution?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Carmine,
I guess that the mistake is at the line below, you have scale while it should be power. With scale=2, your operation was a multiply by 2 instead of a power of 2.
p = Power(graph, dict(power=2, name=node.name + '/pow_'))
Best,
Severine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page