This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!cd lib && git clone https://github.com/apache/incubator-mxnet.git | |
!aws s3 cp s3://$s3_output_path/$training_job_name/output/model.tar.gz working/model/model-orig.tar.gz | |
### This command rolls back to the commit before they removed the deploy.py script. ### | |
!cd lib/incubator-mxnet && git checkout 26f44b71d8de84bbc88af496ae0aeb7ce535312d | |
### Unpack the model and move the files into a tmp directory ### | |
!cd working/model/tmp && tar xvfpz ../model.tar.gz.orig | |
!cd working/model/tmp && mv model_algo_1-0000.params model_resnet50_300-0100.params | |
!cd working/model/tmp && mv model_algo_1-symbol.json model_resnet50_300-symbol.json | |
### Extract the model artifacts and optimize them for DeepLens ### | |
!cd working/model/tmp && python3 ../../../lib/incubator-mxnet/example/ssd/deploy.py --network resnet50 --data-shape 300 --num-class 2 --epoch 100 --prefix model_ | |
### Pack the model back up into the model directory ### | |
!cd working/model/tmp && mv model_resnet50_300-0100.params model_resnet50_300-0000.params | |
!cd working/model/tmp && tar cvfz ../model.tar.gz model_resnet50_300-0000.params model_resnet50_300-symbol.json hyperparams.json | |
!cd working/model && aws s3 cp model.tar.gz $s3_output_path/$training_job_name/output/model.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment