Hi, I’m writing my own Costom Operator Op following the tutorials here: https://github.com/apache/incubator-mxnet/blob/master/example/numpy-ops/custom_softmax.py
I want to change the “in_data” because my custom loss needs the outputs from anther network.
for this moment it has “data” and “label”.
I changed the Data Batch in “forward” of Sequential module. However, when the data_batch was passed into CustomOp, there is only “data” and "label’ part.
I couldn’t figure it out how the data batch was passed from the forward function of Module to the Custom Op.
So ideally I can get another part of data besides data and label by
data = in_data
label = in_data
pred = in_data
when I asked this on Github (This was actually is not a good idea), and I was told
I can pass more arguments like following:
mx.sym.Custom([a, b, c, d, e], …)
mx.nd.Custom([a, b, c, d, e], …)
in which a = in_data, b = in_data, c = in_data, d = in_data, e = in_data.
But here because I write my own Module and was going to pass the data directly to the forward function in Module, but not “outside”.
Maybe I missed something?
Can anyone give me some advice. Thank you.