Skip to content

FIX RuntimeError: cannot join current thread #303

@vangkhung52

Description

@vangkhung52
  1. open C:\Users<ur Username>\anaconda3\envs<ur env name>\Lib\site-packages\torchvision\ops\misc.py

  2. 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))
    )

  3. 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)

  4. idk how but everything work!~ sr for broken English

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions