Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upsample' object has no attribute 'recompute scale factor'请问一下这个怎么解决了 #30

Open
wujijians opened this issue Feb 1, 2023 · 2 comments

Comments

@wujijians
Copy link

No description provided.

@kordokrip
Copy link

File path: \Python39\site-packages\torch\nn\modules\upsampling.py

Find the file in the path written above and modify the code as below.

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

@EugeoKirito
Copy link

找到文件upsampling.py并打开 修改

return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners,recompute_scale_factor=self.recompute_scale_factor)


return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants