ptrblck:

conda activate my_env_name


Created new env and installed pytorch libraries
(eva-4) C:\Users\gajanana_ganjigatti>python -m ipykernel install --user --name=my_env_name
Installed kernelspec eva-4 in C:\Users\gajanana_ganjigatti\AppData\Roaming\jupyter\kernels\my_env_name
getting the same error below.
 in init(self)
20             nn.ReLU,
21             nn.BatchNorm2d(64),
—> 22             nn.MaxPool2d(2, 2),
23         )
24
C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\container.py in init(self, *args)
51         else:
52             for idx, module in enumerate(args):
—> 53                 self.add_module(str(idx), module)
54
55     def _get_item_by_idx(self, iterator, idx):
C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py in add_module(self, name, module)
192         if not isinstance(module, Module) and module is not None:
193             raise TypeError("{} is not a Module subclass".format(
–> 194                 torch.typename(module)))
195         elif not isinstance(name, torch._six.string_classes):
196             raise TypeError(“module name should be a string. Got {}”.format(
TypeError: torch.nn.modules.activation.ReLU is not a Module subclass