mxnet-ssd icon indicating copy to clipboard operation
mxnet-ssd copied to clipboard

Support in Float16

Open davsol opened this issue 6 years ago • 4 comments

Hi, I've recently been thinking about ways to make SSD even faster, since mxnet is capable of running in float16.. So, I've tried to modify 'inceptionv3.py' to support float16, as in "https://github.com/apache/incubator-mxnet/blob/master/example/image-classification/symbols/inception-v3.py"

but got this exception: RuntimeError: simple_bind error. Arguments: data: (64, 3L, 300L, 300L) label: (64, 58, 6) Error in operator ch_concat_mixed_2_chconcat_anchors: [18:16:58] include/mxnet/operator.h:227: Check failed: in_type->at(i) == mshadow::default_type_flag || in_type->at(i) == -1 Unsupported data type 2

I guess it is because we have a detection framework and not classification, but it sounds like there's a way.. is there? @zhreshold Thanks, David

davsol avatar Dec 02 '17 18:12 davsol

You need to cast not only data but also label to float16 in symbol. You can follow the instruction on mxnet/example/image-classifcation/symbols/resnet.py Basically it's a mx.sym.cast('float16') for all inputs.

zhreshold avatar Dec 04 '17 21:12 zhreshold

@davsol

Are you able to make float16 working?

Thanks,

kaishijeng avatar Feb 21 '18 04:02 kaishijeng

I tried but had no luck.. Aside from casting inputs I ran into some errors that I didn't handle

Did you try yourself?

On Feb 21, 2018 6:20 AM, "kaishijeng" [email protected] wrote:

@davsol https://github.com/davsol

Are you able to make float16 working?

Thanks,

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zhreshold/mxnet-ssd/issues/148#issuecomment-367208973, or mute the thread https://github.com/notifications/unsubscribe-auth/ALzmee9put8VJub_Q3fUKlPCyHzs_yu1ks5tW5mWgaJpZM4QzaO- .

davsol avatar Feb 21 '18 06:02 davsol

Not yet

Thanks,

kaishijeng avatar Feb 22 '18 04:02 kaishijeng