add_module() missing 1 required positional argument: 'module'

I use the same file in two Google colab, ones can run, but another get a TypeError, which is 'add_module() missing 1 required positional argument: ‘module’.
The following code contains the add_module()

# self.straight.add_module(nn.BatchNorm1d(num_features=out_channel))

length = duration - sum(kernels) + len(kernels)  # 卷积结束后作池差

.add_module expects a name and module as the arguments. Could you add the name for the relu module and try it again?

Thanks, after adding the name, it works!