-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
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
add relay.frontend.from_oneflow support cnns #1
Conversation
python/tvm/relay/frontend/oneflow.py
Outdated
dtype=str(node_array.dtype) | ||
) | ||
|
||
for node_name in nodes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
移到上面的for loop里面吧
python/tvm/relay/frontend/oneflow.py
Outdated
|
||
def _parse_input(self, node, model_dir_path): | ||
for input_name in node.user_conf.input: | ||
node_input_name = node.name + '-' + input_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 改成 os.path.join
python/tvm/relay/frontend/oneflow.py
Outdated
|
||
|
||
def fix_outputs(op_name, outputs): | ||
if op_name.lower() == "Dropout": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是不是写错了,lower之后应该是dropout
python/tvm/relay/frontend/oneflow.py
Outdated
{ | ||
node1_name: | ||
{ | ||
'name': node1_name, # str, like "conv1-in./model_path/Input_0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个name不太对
python/tvm/relay/frontend/oneflow.py
Outdated
if not freeze_params: | ||
for node_init_name in user_input: | ||
if "Input_0" not in node_init_name: | ||
raise KeyError("the key of user_input should be: name of network layer 1(like \'conv1\') + \'-in\'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这句提示感觉怪怪的?
python/tvm/relay/frontend/oneflow.py
Outdated
node = nodes[node_name] | ||
if is_user_op(node): | ||
for input_name in node.user_conf.input: | ||
node_init_name = node_name + '-' + input_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.path.join
python/tvm/relay/frontend/oneflow.py
Outdated
""" | ||
try: | ||
import oneflow | ||
import oneflow.experimental as flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把这个exprimental删掉
mobilenetv2,resnet50、alexnet、vgg都是可以的