Hi,
since MXNet’s Crop is deprecated, and thus I cannot convert a model from MXNet to ONNX, I’m struggling to change Crop with slice_axis where axis=1 (this is supported - I can export it from MXNet to ONNX).
I’ve added the visual part of my graph
Here’s a part of the code of Crop:
F2 = 128 _bwm = 1.0 conv4_128 = conv_act_layer(relu4_3, 'ssh_m1_red_conv', F2, kernel=(1, 1), pad=(0, 0), stride=(1, 1), act_type='relu', bias_wd_mult=_bwm) conv5_128 = conv_act_layer(relu5_3, 'ssh_m2_red_conv', F2, kernel=(1, 1), pad=(0, 0), stride=(1, 1), act_type='relu', bias_wd_mult=_bwm) conv5_128_up = mx.symbol.Deconvolution(data=conv5_128, num_filter=F2, kernel=(4,4), stride=(2, 2), pad=(1,1), num_group = F2, no_bias = True, attr={'__lr_mult__': '0.0', '__wd_mult__': '0.0'}, name='ssh_m2_red_upsampling') #conv5_128_up = mx.symbol.Deconvolution(data=conv5_128, num_filter=F2, kernel=(2,2), stride=(2, 2), pad=(0,0), # num_group = F2, no_bias = True, attr={'__lr_mult__': '0.0', '__wd_mult__': '0.0'}, # name='ssh_m2_red_upsampling') conv4_128 = mx.symbol.Crop(*[conv4_128, conv5_128_up])
and it looks like this in the .json file:
}, { "op": "Crop", "name": "crop0", "attrs": {"num_args": "2"}, "inputs": [[117, 0, 0], [123, 0, 0]] },
And I’m trying to delete the Crop operation and used slice instead, and this doesn’t work: (would love to get your help on that)
{ "op": "slice_axis", "name": "slice", "attrs": { "axis": "1", "begin": "0", "end": "128" }, "inputs": [[117, 0, 0], [123, 0, 0]] },