5101a0fe2a89683ea3df8cb896610aaa3da04fb1,pytorch2keras/converter.py,,pytorch_to_keras,#,141
Before Change
node_scope_name = node.scopeName()
node_id = get_node_id(node)
node_weights_name = ".".join(
re.findall(r"\[([\w\d.\-\[\]\s]+)\]", node_scope_name)
)
node_attrs = {k: node[k] for k in node.attributeNames()}
node_outputs = list(node.outputs())
After Change
node_scope_name = node.scopeName()
node_id = get_node_id(node)
node_name_regex = re.findall(r"\[([\w\d.\-\[\]\s]+)\]", node_scope_name)
try:
int(node_name_regex[-1])
node_weigth_group_name = ".".join(
node_name_regex[:-1]
)
node_weights_name = node_weigth_group_name + "." + str(group_indices[node_weigth_group_name])
group_indices[node_weigth_group_name] += 1
except ValueError:
node_weights_name = ".".join(
node_name_regex
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: nerox8664/pytorch2keras
Commit Name: 5101a0fe2a89683ea3df8cb896610aaa3da04fb1
Time: 2019-01-01
Author: nerox8664@gmail.com
File Name: pytorch2keras/converter.py
Class Name:
Method Name: pytorch_to_keras
Project Name: osmr/imgclsmob
Commit Name: d9f6e28568406c162b79f582ae037a89a3118d26
Time: 2021-02-16
Author: osemery@gmail.com
File Name: prep_model.py
Class Name:
Method Name: post_process
Project Name: acl-org/acl-anthology
Commit Name: da3203cb47df1c583452f671c8e9600214925ff2
Time: 2019-05-30
Author: post@cs.jhu.edu
File Name: bin/add_attachment.py
Class Name:
Method Name: main