You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the following code to modify attrs in my custom graph optimizer but at the time of model inference, attrs field keep unchanged. And I try to comment out graph.SetGraphProtoSyncNeeded() or graph.SetGraphResolveNeeded() but the attr is still the old value.
auto attrs = some_op->GetMutableAttributes(); attrs['my_field'].set_i(new_value); graph.SetGraphResolveNeeded(); graph.SetGraphProtoSyncNeeded(); graph.Resolve();
Could someone give some help for this problem? Thanks
update:
I find out it's my bug auto attrs = some_op->GetMutableAttributes();
should be auto &attrs = some_op->GetMutableAttributes();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I use the following code to modify attrs in my custom graph optimizer but at the time of model inference, attrs field keep unchanged. And I try to comment out graph.SetGraphProtoSyncNeeded() or graph.SetGraphResolveNeeded() but the attr is still the old value.
auto attrs = some_op->GetMutableAttributes();
attrs['my_field'].set_i(new_value);
graph.SetGraphResolveNeeded();
graph.SetGraphProtoSyncNeeded();
graph.Resolve();
Could someone give some help for this problem? Thanks
update:
I find out it's my bug
auto attrs = some_op->GetMutableAttributes();
should be
auto &attrs = some_op->GetMutableAttributes();
Best Regards
Beta Was this translation helpful? Give feedback.
All reactions