You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open C:\Users<ur Username>\anaconda3\envs<ur env name>\Lib\site-packages\torchvision\ops\misc.py
go to line 74 (_check_size_scale_factor funtion) and change it to:
def _check_size_scale_factor(dim, size, scale_factor):
if size is None and scale_factor is None:
raise ValueError("either size or scale_factor should be defined")
if size is not None and scale_factor is not None:
raise ValueError("only one of size or scale_factor should be defined")
if scale_factor is not None:
if isinstance(scale_factor, (list, tuple)):
if len(scale_factor) != dim:
raise ValueError(
"scale_factor shape must match input shape. "
"Input is {}D, scale_factor size is {}".format(dim, len(scale_factor))
)
find the line output_shape = tuple(input.shape[:-2]) + output_shape (for me it's 118) and change it to:
output_shape = tuple(input.shape[:-2]) + tuple(output_shape)
idk how but everything work!~ sr for broken English
open C:\Users<ur Username>\anaconda3\envs<ur env name>\Lib\site-packages\torchvision\ops\misc.py
go to line 74 (_check_size_scale_factor funtion) and change it to:
def _check_size_scale_factor(dim, size, scale_factor):
if size is None and scale_factor is None:
raise ValueError("either size or scale_factor should be defined")
if size is not None and scale_factor is not None:
raise ValueError("only one of size or scale_factor should be defined")
if scale_factor is not None:
if isinstance(scale_factor, (list, tuple)):
if len(scale_factor) != dim:
raise ValueError(
"scale_factor shape must match input shape. "
"Input is {}D, scale_factor size is {}".format(dim, len(scale_factor))
)
find the line output_shape = tuple(input.shape[:-2]) + output_shape (for me it's 118) and change it to:
output_shape = tuple(input.shape[:-2]) + tuple(output_shape)
idk how but everything work!~ sr for broken English