Hi, version of colab is PyTorch1.5.0, I modified detection.py and ssd.py
so that it works without warning and error.
Since detection.py have torch.autograd.Function, I delete def  init () and add @staticmethod 12.
I also add output = self.detect.apply() in ssd.py.
I share my code and you can find in ‘# PyTorch1.5.0 support new-style autograd function’ in source.

  
      github.com
  
  
    miyamotok0105/pytorch_handbook/blob/master/chapter7/layers/functions/detection.py 169
"""
Copyright (c) 2017 Max deGroot, Ellis Brown
Released under the MIT license
https://github.com/amdegroot/ssd.pytorch
Updated by: Takuya Mouri
"""
import torch
from torch.autograd import Function
from ..box_utils import decode, nms
from data import voc as cfg


class Detect(Function):
    """At test time, Detect is the final layer of SSD.  Decode location preds,
    apply non-maximum suppression to location predictions based on conf
    scores and threshold to a top_k number of output predictions for both
    confidence score and locations.
    """
    # PyTorch1.5.0 support new-style autograd function
    #def __init__(self, num_classes, bkg_label, top_k, conf_thresh, nms_thresh):


  This file has been truncated. show original