The Identity module is considered as a node.
The node itself or its children should be registered in convert_dict.
However, it is not registered, and it has no children.
def find_unimplemented(hierarchy: PytorchNodeHierarchy, converter_dict: Dict[object, Pytorch2KerasNodeConverter]) -> Optional[PytorchNodeHierarchy]:
# Test if the node itself has a converter
if has_converter(hierarchy.node, converter_dict):
return None
elif len(hierarchy.children) == 0:
return PytorchNodeHierarchy(hierarchy.node, hierarchy.children)
else:
children_unimplemented = []
for child in hierarchy.children:
child_unimplemented = find_unimplemented(child, converter_dict)
if child_unimplemented is not None:
children_unimplemented.append(child_unimplemented)
if len(children_unimplemented) > 0:
# The node is unimplemented
return PytorchNodeHierarchy(hierarchy.node, children_unimplemented)
Reproduction
Identity layer(no function in forward) causes the unimplemented nodes error.
Reason
The Identity module is considered as a node. The node itself or its children should be registered in convert_dict. However, it is not registered, and it has no children.