mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Extract net and blobs assignment to separate functions
Summary: Use AddNet and AddBlobs to add net and blobs to meta_net_def. This a codemod and does not change the functionality. It is for preparation of the protobuf change. Depends on: D4770648 Reviewed By: salexspb Differential Revision: D4771110 fbshipit-source-id: 00cecb2105f2c332bd50c3c51b9a10e1004fa90f
This commit is contained in:
parent
e591ddb70b
commit
29c1102806
|
|
@ -206,5 +206,13 @@ def debug(f):
|
|||
return wrapper
|
||||
|
||||
|
||||
def AddBlobs(meta_net_def, blob_name, blob_def):
|
||||
meta_net_def.blobs[blob_name] = blob_def
|
||||
|
||||
|
||||
def AddPlan(meta_net_def, plan_name, plan_def):
|
||||
meta_net_def.plans[plan_name] = str(plan_def)
|
||||
|
||||
|
||||
def AddNet(meta_net_def, net_name, net_def):
|
||||
meta_net_def.nets[net_name] = net_def
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user