Hi, I’m facing the same problem I thought that could be something in my code so I removed everything and just keep the imports as follows:
%matplotlib inline
%config InlineBackend.figure_format = 'retina'

import matplotlib.pyplot as plt

import torch
from torch import nn
from torch import optim
import torch.nn.functional as F
from torchvision import models

and I still got RuntimeError:
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-37-eda6ee908992> in <module>
      5 from torch import optim
      6 import torch.nn.functional as F
----> 7 from torchvision import models
      8 # Use GPU if it's available

~\Anaconda3\envs\pysyft\lib\site-packages\torchvision\__init__.py in <module>
----> 1 from torchvision import models
      2 from torchvision import datasets
      3 from torchvision import ops
      4 from torchvision import transforms
      5 from torchvision import utils

~\Anaconda3\envs\pysyft\lib\site-packages\torchvision\models\__init__.py in <module>
      9 from .shufflenetv2 import *
     10 from . import segmentation
---> 11 from . import detection

~\Anaconda3\envs\pysyft\lib\site-packages\torchvision\models\detection\__init__.py in <module>
----> 1 from .faster_rcnn import *
      2 from .mask_rcnn import *
      3 from .keypoint_rcnn import *

~\Anaconda3\envs\pysyft\lib\site-packages\torchvision\models\detection\faster_rcnn.py in <module>
     11 
     12 from .generalized_rcnn import GeneralizedRCNN
---> 13 from .rpn import AnchorGenerator, RPNHead, RegionProposalNetwork
     14 from .roi_heads import RoIHeads
     15 from .transform import GeneralizedRCNNTransform

~\Anaconda3\envs\pysyft\lib\site-packages\torchvision\models\detection\rpn.py in <module>
      6 from torchvision.ops import boxes as box_ops
      7 
----> 8 from . import _utils as det_utils
      9 
     10 

~\Anaconda3\envs\pysyft\lib\site-packages\torchvision\models\detection\_utils.py in <module>
     72 
     73 
---> 74 @torch.jit.script
     75 def encode_boxes(reference_boxes, proposals, weights):
     76     # type: (torch.Tensor, torch.Tensor, torch.Tensor) -> torch.Tensor

~\Anaconda3\envs\pysyft\lib\site-packages\torch\jit\__init__.py in script(obj, optimize, _frames_up, _rcb)
    822     else:
    823         ast = get_jit_def(obj)
--> 824         fn = torch._C._jit_script_compile(ast, _rcb, get_default_args(obj))
    825         # Forward docstrings
    826         fn.__doc__ = obj.__doc__

RuntimeError: 

for operator (Tensor 0) -> Tensor:
expected a value of type Tensor for argument '0' but found (Tensor, Tensor, Tensor, Tensor)
    gt_heights = reference_boxes_y2 - reference_boxes_y1
    gt_ctr_x = reference_boxes_x1 + 0.5 * gt_widths
    gt_ctr_y = reference_boxes_y1 + 0.5 * gt_heights

    targets_dx = wx * (gt_ctr_x - ex_ctr_x) / ex_widths
    targets_dy = wy * (gt_ctr_y - ex_ctr_y) / ex_heights
    targets_dw = ww * torch.log(gt_widths / ex_widths)
    targets_dh = wh * torch.log(gt_heights / ex_heights)

    targets = torch.cat((targets_dx, targets_dy, targets_dw, targets_dh), dim=1)
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
    return targets
:
    gt_heights = reference_boxes_y2 - reference_boxes_y1
    gt_ctr_x = reference_boxes_x1 + 0.5 * gt_widths
    gt_ctr_y = reference_boxes_y1 + 0.5 * gt_heights

    targets_dx = wx * (gt_ctr_x - ex_ctr_x) / ex_widths
    targets_dy = wy * (gt_ctr_y - ex_ctr_y) / ex_heights
    targets_dw = ww * torch.log(gt_widths / ex_widths)
    targets_dh = wh * torch.log(gt_heights / ex_heights)

    targets = torch.cat((targets_dx, targets_dy, targets_dw, targets_dh), dim=1)
              ~~~~~~~~~ <--- HERE
    return targets