Lornatang / SRGAN-PyTorch

A simple and complete implementation of super-resolution paper.
Apache License 2.0
410 stars 105 forks source link

TypeError: unsupported operand type(s) for |: 'torch._C._TensorMeta' and 'type' #74

Closed Satyajit1993 closed 1 year ago

Satyajit1993 commented 1 year ago

Hello Lorna

I am getting an error message in image_quality_assessment.py, line 584,

kernel: torch.Tensor | tuple, TypeError: unsupported operand type(s) for |: 'torch._C._TensorMeta' and 'type'

Kindly Help.

Lornatang commented 1 year ago

I can't judge exactly how this problem arises, guess it may be a return type problem, try to remove the return type?

Satyajit1993 commented 1 year ago

Are you able to run the code without any error?

After removing the unsupported operand many other errors are arising

Kindly help by telling your environment cuda cudnn pytorch

On Wed, Apr 19, 2023, 01:52 Lorna @.***> wrote:

I can't judge exactly how this problem arises, guess it may be a return type problem, try to remove the return type?

— Reply to this email directly, view it on GitHub https://github.com/Lornatang/SRGAN-PyTorch/issues/74#issuecomment-1513749777, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASPDQNOE3HENBXMSUJBT673XB3ZXHANCNFSM6AAAAAAW7HEQAI . You are receiving this because you authored the thread.Message ID: @.***>

Lornatang commented 1 year ago

I run in Ubuntu22.04, no error.

Lornatang commented 1 year ago

Torch >= 1.13.1 CUDNN >= 8.x

linnnn1 commented 1 year ago

请问您解决这个问题了吗?我遇到了同样的问题

kartikchhipa commented 1 year ago

TypeError: unsupported operand type(s) for |: 'torch._C._TensorMeta' and 'type'

Use Python >=3.10 This would solve this problem