AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘

created at 03-19-2022 views: 145

problem

AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘

solution

click on this file

click this file

modification:

def forward(self,input: Tensor) -> Tensor:
    # change:
    # return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners,
    # recompute_scale_factor = self.recompute_scale_factor)

    # to
    return F.interpolate(input, self.size, self.scale_factor, self.mode, 
    self.align_corners)
created at:03-19-2022
edited at: 03-19-2022: