Torch Sequential type error

I’m working through some notebooks in Colab; and seem to have gotten something tangled up.

The below line (which is pretty much straight from the torch docs)

import torch.nn as tnn

modelSomeOther = tnn.Sequential(

Is hitting the below error:

      3 modelSomeOther = tnn.Sequential(
----> 4                 tnn.Conv2d(1,20,5),
      5                 tnn.ReLU(),
      6                 tnn.Conv2d(20,64,5),

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/ in __init__(self, in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias, padding_mode)
    404         padding = _pair(padding)
    405         dilation = _pair(dilation)
--> 406         super(Conv2d, self).__init__(
    407             in_channels, out_channels, kernel_size, stride, padding, dilation,
    408             False, _pair(0), groups, bias, padding_mode)

TypeError: super(type, obj): obj must be an instance or subtype of typ

When I start a new Colab doc; and just import torch; the above code executes

Any thoughts / pointers would be much appreciated

The colab doc is here:

We currently don’t have access to it, you need to change your share settings to those with a link :slight_smile:

Ah; shananegans that bit of UI always confuses me

And thanks for the world record reply time

However; just restarting the runtime environment seems to have resolved it