convolution() got an unexpected keyword argument 'name'

报错是
Traceback (most recent call last):
File “/usr/lib/python3.9/multiprocessing/process.py”, line 315, in _bootstrap
self.run()
File “/usr/lib/python3.9/multiprocessing/process.py”, line 108, in run
self._target(*self._args, **self._kwargs)
File “/home/lzh/Public/code/python/我的论文/量化投资程序与数据/main.py”, line 53, in trainDef
train(self.net, trainData, testData, self.batch_size, self.trainer, self.ctx, self.num_epochs)
File “/home/lzh/Public/code/python/我的论文/量化投资程序与数据/mynet.py”, line 78, in train
y_hat = net(XDeep,XWide)
File “/usr/lib/python3.9/site-packages/mxnet/gluon/block.py”, line 849, in call
out = self.forward(*args)
File “/home/lzh/Public/code/python/我的论文/量化投资程序与数据/mynet.py”, line 126, in forward
self.deep(xDeep)
File “/usr/lib/python3.9/site-packages/mxnet/gluon/block.py”, line 849, in call
out = self.forward(*args)
File “/usr/lib/python3.9/site-packages/mxnet/gluon/nn/basic_layers.py”, line 58, in forward
x = block()(x, *args)
File “/usr/lib/python3.9/site-packages/mxnet/gluon/block.py”, line 1623, in call
return super().call(x, *args)
File “/usr/lib/python3.9/site-packages/mxnet/gluon/block.py”, line 849, in call
out = self.forward(*args)
File “/usr/lib/python3.9/site-packages/mxnet/gluon/block.py”, line 1679, in forward
return self.hybrid_forward(ndarray, x, *args, **params)
File “/usr/lib/python3.9/site-packages/mxnet/gluon/nn/conv_layers.py”, line 148, in hybrid_forward
act = getattr(F, self._op_name)(x, weight, bias, name=‘fwd’, **self._kwargs)
TypeError: convolution() got an unexpected keyword argument ‘name’

出错的代码是
def Deepnet():
num_channels, growth_rate = 64, 32
num_convs_in_dense_blocks = [4, 4, 4, 4]
netDeep = nn.Sequential()
netDeep.add(nn.Conv2D(64, kernel_size=1, strides=2, padding=3), nn.BatchNorm(),
nn.Activation(‘relu’), nn.MaxPool2D(pool_size=3, strides=2,
padding=1))
for i, num_convs in enumerate(num_convs_in_dense_blocks):
netDeep.add(DenseBlock(num_convs, growth_rate))
# 上一个稠密块的输出通道数
num_channels += num_convs * growth_rate
# 在稠密块之间添加一个转换层,使通道数量减半
if i != len(num_convs_in_dense_blocks) - 1:
num_channels //= 2
netDeep.add(transition_block(num_channels))
netDeep.add(nn.BatchNorm(), nn.Activation(‘relu’), nn.GlobalAvgPool2D())
return netDeep
def Widenet():
netWide = nn.Sequential()
netWide.add(nn.Dense(6))
return netWide
class get_net(nn.Block):
def init(self,**kwargs):
super(get_net,self).init(**kwargs)
self.deep = Deepnet()
self.wide = Widenet()
self.output = nn.Dense(2,activation=‘relu’)
def forward(self,xDeep,xWide):
print(xDeep)
return(
self.output(
np.concatenate(
(
self.wide(xWide),
self.deep(xDeep)
),axis=None
)
)
)