how can i do a image mean substraction operation in symbol?
hi, new to mxnet, i wonder how can i do a image mean substraction operation in symbol using existing layer? any suggestions would be greatly apprecitate. thanks ahead
It's probably easier if you do the subtraction in the data iterator. There are a number of solutions readily available: https://mxnet.apache.org/api/python/io.html#mxnet.io.ImageRecordIter https://mxnet.apache.org/api/python/image.html#overview
@szha thanks for your reply, I have to test my model using raw data(without mean substraction) for some reasons.Is it convenient to put the mean substraction operation as a existing layer?
@dyzhou2015 yes, it's doable, though it may become verbose in symbol. Mean subtraction can be regarded as a broadcast subtraction operation. You can use sym.ones and sym.concat to create the vector for image mean, and then sym.broadcast_sub for the mean subtraction. There may be better solutions out there, and this is one solution that I can think of.
thanks a lot @szha