[bin] check torch script (#36)
* update run.sh * [network] add code to check whether the model can be exported to torch script or not
This commit is contained in:
parent
afbc1d2960
commit
bd504c3cee
@ -164,9 +164,9 @@ def main():
|
||||
# !!!IMPORTANT!!!
|
||||
# Try to export the model by script, if fails, we should refine
|
||||
# the code to satisfy the script export requirements
|
||||
# if args.rank == 0:
|
||||
# script_model = torch.jit.script(model)
|
||||
# script_model.save(os.path.join(args.model_dir, 'init.zip'))
|
||||
if args.rank == 0:
|
||||
script_model = torch.jit.script(model)
|
||||
script_model.save(os.path.join(args.model_dir, 'init.zip'))
|
||||
executor = Executor()
|
||||
# If specify checkpoint, load some info from checkpoint
|
||||
if args.checkpoint is not None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user