Skip to content

Commit c5a3422

Browse files
committed
Enable copy over behavior of attributes of automatic created vars (apache#34)
1 parent a6f6a0e commit c5a3422

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)