You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/10/22 02:05:18 UTC
[GitHub] [incubator-mxnet] fumingxing2015 commented on issue #16562: Same
model but different time-consuming
fumingxing2015 commented on issue #16562: Same model but different time-consuming
URL: https://github.com/apache/incubator-mxnet/issues/16562#issuecomment-544778677
This is my model and params [https://pan.baidu.com/s/1S7bL2rjYSx0AlDKAgfSADw&shfl=sharepset](url)
The OS I use is Ubuntu 16.04.4 .
I use single cpu to test the inference time,cpu info: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz.
the model input is 256*128 rgb image , built-in model consume 20ms,my model consume 80ms.
my test code :
`
ctx = mx.cpu()
net0 = gluon.nn.SymbolBlock.imports("test.json", ['data'],
"test.params", ctx=ctx)
net1=model_zoo.get_model('MobileNet1.0', pretrained=True,ctx=ctx)
file0="test_img/0_0.jpg"
file1="test_img/0_1.jpg"
x, img = load_test(file0, short=128)
t0=time.time()
net0(x)
mx.nd.waitall()
t1=time.time()
print("my model: ",t1-t0)
t0=time.time()
net1(x)
mx.nd.waitall()
t1=time.time()
print("built-in model: ",t1-t0)
`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services