How to modify net's param


#1

from mxnet.gluon.model_zoo import vision

res_net50 = vision.resnet50_v1()

how to modify the kernel size of the first layer "conv " .
7x7 -> 3x3


#2

You can use register_child to replace the layer:

from mxnet.gluon.model_zoo import vision
from mxnet import gluon
import mxnet as mx

net = vision.resnet50_v1()
new_layer = gluon.nn.Conv2D(64, kernel_size=(8, 8), strides=(4, 4), padding=(3, 3))
f = net.features
f.register_child( new_layer, "0")
new_layer.initialize(mx.init.Xavier())
print(net)