当我使用函数UpSampling(python,mxnet version:1.0.0)和最接近的插值时,一切正常(打印放大的输出形状):
nfilters = 16xx = nd.random_normal(shape = [2,…
mxnet.ndarray.UpSampling 似乎期望双线性sample_type有2个输入(1输入和1个权重)
mxnet.ndarray.UpSampling
此外,我认为缺少num_args参数的文档,您可以在此处查看。 https://github.com/apache/incubator-mxnet/blob/master/src/operator/nn/upsampling-inl.h#L78
这应该工作:
import mxnet as mx import mxnet.ndarray as nd xx = nd.random_normal(shape=[1,1,256,256],ctx=mx.cpu()) xx1 = nd.random_normal(shape=[1,1,4,4],ctx=mx.cpu()) temp = nd.UpSampling(xx,xx1, num_filter=1, scale=2, sample_type='bilinear', num_args=2)