I'm using the CustomOp
class in MXNet to create a new transformation layer. This layer has output_dimensionality
as a hyper-parameter for the layer. This dimensionality can't automatically be inferred from the data, but needs to be chosen by the caller who is building the network graph, so it should be a constructor argument for the new symbol, like
net = mx.symbol.Custom(data=data, op_type='mycustomop', output_dimensionality=1024)
which would be consumed by the __init__
constructor of my CustomOp
subclass. But when I try this, I get:
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 314, in 'calling callback function'
File "python/mxnet/operator.py", line 602, in creator
op_prop = prop_cls(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'output_dimensionality'
Segmentation fault (core dumped)