msracver / Flow-Guided-Feature-Aggregation

Flow-Guided Feature Aggregation for Video Object Detection
MIT License
723 stars 191 forks source link

Symbol can not use “+=” #13

Open Feywell opened 6 years ago

Feywell commented 6 years ago

MXNet : 1.0 Python ; 2.7.14 I try to run the demo, but an error like following:

Traceback (most recent call last): File "./fgfa_rfcn/demo.py", line 257, in main() File "./fgfa_rfcn/demo.py", line 99, in main aggr_sym = aggr_sym_instance.get_aggregation_symbol(cfg) File "/home/liyang/Flow-Guided-Feature-Aggregation-master/fgfa_rfcn/symbols/resnet_v1_101_flownet_rfcn.py", line 1081, in get_aggregation_symbol aggregated_conv_feat += tiled_weight * warp_list[i] File "/home/liyang/anaconda2/lib/python2.7/site-packages/mxnet-1.0.0-py2.7.egg/mxnet/symbol/symbol.py", line 104, in iadd raise NotImplementedForSymbol(self.iadd, '+=', other, 1) mxnet.base.NotImplementedForSymbol: Function iadd (namely operator "+=") with arguments (<class 'mxnet.symbol.symbol.Symbol'>, <type 'int'>) is not implemented for Symbol and only available in NDArray.

How can I fix that issue? Thank you!

xingkongliang commented 6 years ago

It says that '+=' is not implemented, so change aggregated_conv_feat += tiled_weight * warp_list[i] to aggregated_conv_feat = aggregated_conv_feat + tiled_weight * warp_list[i]

mornfairy commented 5 years ago

It says that '+=' is not implemented, so change aggregated_conv_feat += tiled_weight * warp_list[i] to aggregated_conv_feat = aggregated_conv_feat + tiled_weight * warp_list[i]

I also meet this question. And your answer really help me a lot ! Thank you very much!!!!