Tramac / Lightweight-Segmentation

Lightweight models for real-time semantic segmentation(include mobilenetv1-v3, shufflenetv1-v2, igcv3, efficientnet).
Apache License 2.0
356 stars 77 forks source link

to onnx #21

Closed ygy12345678 closed 2 years ago

ygy12345678 commented 2 years ago

to_onnx->onnx_to_trt Unsupported: ONNX export of operator adaptive_avg_pool2d, since output size is not factor of input size

ygy12345678 commented 2 years ago

mobilenetv3_small 模型修改过造成的 self.b1 = nn.Sequential(

nn.AdaptiveAvgPool2d((8, 8)),

        nn.AvgPool2d(kernel_size=(1, 1), stride=(6, 6)),  # check it
        nn.Conv2d(in_channels, out_channels, 1, bias=False),
        nn.Sigmoid(),
    )