ó šÄïYc@sîdZddlmZddgZddlZddlZddlmZmZd„d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSgDƒZ d7Z d8Z d9„Z ej jd:ƒd;„Zej jd:ƒd<„ZdS(Ts!Model zoo for pre-trained models.iÿÿÿÿ(tprint_functiontget_model_filetpurgeNi(tdownloadt check_sha1cCsi|]\}}||“qS(((t.0tchecksumtname((sAbuild/bdist.linux-armv7l/egg/mxnet/gluon/model_zoo/model_store.pys s t(44335d1f0046b328243b32a26a4fbd62d9057b45talexnett(f27dbf2dbd5ce9a80b102d89c7483342cd33cb31t densenet121t(b6c8a95717e3e761bd88d145f4d0a214aaa515dct densenet161t(2603f878403c6aa5a71a124c4a3307143d6820e9t densenet169t(1cdbc116bc3a1b65832b18cf53e1cb8e7da017ebt densenet201t(ed47ec45a937b656fcc94dabde85495bbef5ba1ft inceptionv3t(d2b128fa89477c2e20061607a53a8d9f66ce239dt resnet101_v1t(6562166cd597a6328a32a0ce47bb651df80b3bbbt resnet152_v1t(38d6d423c22828718ec3397924b8e116a03e6ac0t resnet18_v1t(4dc2c2390a7c7990e0ca1e53aeebb1d1a08592d1t resnet34_v1t(2a903ab21260c85673a78fe65037819a843a1f43t resnet50_v1t(8aacf80ff4014c1efa2362a963ac5ec82cf92d5bt resnet18_v2t(0ed3cd06da41932c03dea1de7bc2506ef3fb97b3t resnet34_v2t(264ba4970a0cc87a4f15c96e25246a1307caf523s squeezenet1.0t(33ba0f93753c83d86e1eb397f38a667eaf2e9376s squeezenet1.1t(dd221b160977f36a53f464cb54648d227c707a05tvgg11t(ee79a8098a91fbe05b7a973fed2017a6117723a8tvgg11_bnt(6bc5de58a05a5e2e7f493e2d75a580d83efde38ctvgg13t(7d97a06c3c7a1aecc88b6e7385c2b373a249e95etvgg13_bnt(649467530119c0f78c4859999e264e7bf14471a9tvgg16t(6b9dbe6194e5bfed30fd7a7c9a71f7e5a276cb14tvgg16_bnt(f713436691eee9a20d70a145ce0d53ed24bf7399tvgg19t(9730961c9cea43fd7eeefb00d792e386c45847d6tvgg19_bns>https://{bucket}.s3.amazonaws.com/gluon/models/{file_name}.zips apache-mxnetcCs3|tkr'tdjd|ƒƒ‚nt|d S(Ns-Pretrained model for {name} is not available.Ri(t _model_sha1t ValueErrortformat(R((sAbuild/bdist.linux-armv7l/egg/mxnet/gluon/model_zoo/model_store.pyt short_hash7s s~/.mxnet/models/cCs5djd|dt|ƒƒ}tjj||dƒ}t|}tjj|ƒrst||ƒrf|Stdƒn tdƒtjj|ƒsŸtj |ƒntjj||dƒ}t t jdt d |ƒd |d t ƒtj|ƒ}|j|ƒWd QXtj|ƒt||ƒr%|Std ƒ‚d S(sèReturn location for the pretrained on local file system. This function will download from online model zoo when model cannot be found or has mismatch. The local_dir directory will be created if it doesn't exist. Parameters ---------- name : str Name of the model. local_dir : str, default '~/.mxnet/models' Location for keeping the model parameters. Returns ------- file_path Path to the requested pretrained model file. s{name}-{short_hash}RR7s.paramssBMismatch in the content of model file detected. Downloading again.s%Model file is not found. Downloading.s.ziptbuckett file_nametpatht overwriteNs5Downloaded file has different hash. Please try again.(R6R7tosR:tjoinR4texistsRtprinttmakedirsRt _url_formatR8tTruetzipfiletZipFilet extractalltremoveR5(Rt local_dirR9t file_patht sha1_hasht zip_file_pathtzf((sAbuild/bdist.linux-armv7l/egg/mxnet/gluon/model_zoo/model_store.pyR<s,     cCsRtj|ƒ}x<|D]4}|jdƒrtjtjj||ƒƒqqWdS(s»Purge all pretrained model files in local file store. Parameters ---------- local_dir : str, default '~/.mxnet/models' Location for keeping the model parameters. s.paramsN(R<tlistdirtendswithRFR:R=(RGtfilestf((sAbuild/bdist.linux-armv7l/egg/mxnet/gluon/model_zoo/model_store.pyRks (RR (R R (R R (RR(RR(RR(RR(RR(RR(RR(RR(RR(R R!(R"s squeezenet1.0(R#s squeezenet1.1(R$R%(R&R'(R(R)(R*R+(R,R-(R.R/(R0R1(R2R3(t__doc__t __future__Rt__all__R<RCtutilsRRR4RAR8R7R:t expanduserRR(((sAbuild/bdist.linux-armv7l/egg/mxnet/gluon/model_zoo/model_store.pytsD     /