Skip to content
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

Merged
merged 3 commits into from
Jul 30, 2021
Merged

add relay.frontend.from_oneflow support cnns #1

merged 3 commits into from
Jul 30, 2021

Conversation

hhhfccz
Copy link

@hhhfccz hhhfccz commented Jul 28, 2021

mobilenetv2,resnet50、alexnet、vgg都是可以的

dtype=str(node_array.dtype)
)

for node_name in nodes:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

移到上面的for loop里面吧


def _parse_input(self, node, model_dir_path):
for input_name in node.user_conf.input:
node_input_name = node.name + '-' + input_name
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 改成 os.path.join



def fix_outputs(op_name, outputs):
if op_name.lower() == "Dropout":
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是不是写错了,lower之后应该是dropout

{
node1_name:
{
'name': node1_name, # str, like "conv1-in./model_path/Input_0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个name不太对

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\'")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句提示感觉怪怪的?

node = nodes[node_name]
if is_user_op(node):
for input_name in node.user_conf.input:
node_init_name = node_name + '-' + input_name
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os.path.join

"""
try:
import oneflow
import oneflow.experimental as flow
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把这个exprimental删掉

@BBuf BBuf merged commit 31ee834 into main Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants