Skip to content

Commit 200973a

Browse files
committed
Enable copy over behavior of attributes of automatic created vars (#34)
1 parent b44568c commit 200973a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nnvm/src/core/symbolic.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ void Symbol::Compose(const array_view<const Symbol*>& args,
299299
} else {
300300
n->inputs[i] = NodeEntry{
301301
CreateVariableNode(DefaultVarName(name, arg_names[i])), 0, 0};
302+
// copy attribute of parent over automatically created variables
303+
n->inputs[i].node->attrs.dict = n->attrs.dict;
302304
}
303305
}
304306

0 commit comments

Comments
 (0)