Thanks.
Then I updated to 1.7.0
And the output becomes as below
Is it due to the dependencies or compatibility?
Traceback (most recent call last):

  File "C:\Users\Lee\Downloads\HW4\Q2\federated_learning.py", line 5, in <module>
    from torchvision import datasets, transforms

  File "C:\Users\Lee\AppData\Roaming\Python\Python37\site-packages\torchvision\__init__.py", line 3, in <module>
    from torchvision import models

  File "C:\Users\Lee\AppData\Roaming\Python\Python37\site-packages\torchvision\models\__init__.py", line 12, in <module>
    from . import detection

  File "C:\Users\Lee\AppData\Roaming\Python\Python37\site-packages\torchvision\models\detection\__init__.py", line 1, in <module>
    from .faster_rcnn import *

  File "C:\Users\Lee\AppData\Roaming\Python\Python37\site-packages\torchvision\models\detection\faster_rcnn.py", line 14, in <module>
    from .roi_heads import RoIHeads

  File "C:\Users\Lee\AppData\Roaming\Python\Python37\site-packages\torchvision\models\detection\roi_heads.py", line 211, in <module>
    @torch.jit.script

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\__init__.py", line 1281, in script
    fn = torch._C._jit_script_compile(qualified_name, ast, _rcb, get_default_args(obj))

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\_recursive.py", line 555, in try_compile_fn
    return torch.jit.script(fn, _rcb=rcb)

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\__init__.py", line 1281, in script
    fn = torch._C._jit_script_compile(qualified_name, ast, _rcb, get_default_args(obj))

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\_recursive.py", line 555, in try_compile_fn
    return torch.jit.script(fn, _rcb=rcb)

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\__init__.py", line 1278, in script
    ast = get_jit_def(obj)

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\frontend.py", line 171, in get_jit_def
    return build_def(ctx, py_ast.body[0], type_line, self_name)

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\frontend.py", line 212, in build_def
    build_stmts(ctx, body))

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\frontend.py", line 127, in build_stmts
    stmts = [build_stmt(ctx, s) for s in stmts]

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\frontend.py", line 127, in <listcomp>
    stmts = [build_stmt(ctx, s) for s in stmts]

  File "C:\Users\Lee\anaconda3\lib\site-packages\torch\jit\frontend.py", line 186, in __call__
    raise UnsupportedNodeError(ctx, node)

UnsupportedNodeError: import statements aren't supported