Hi,
I have enabled the anomaly mode and this is what I get in the stack trace:
File "/Users/evgeniya/PycharmProjects/svp/Main.py", line 34, in <module>
    do_EM()
  File "/Users/evgeniya/PycharmProjects/svp/Main.py", line 31, in do_EM
    EM(loader, get_device()).em(epochs=550)
  File "/Users/evgeniya/PycharmProjects/svp/EM.py", line 163, in em
    b, d = self.e(model)
  File "/Users/evgeniya/PycharmProjects/svp/EM.py", line 39, in e
    idx, d, n, cr = self.eval_images(model)
  File "/Users/evgeniya/PycharmProjects/svp/EM.py", line 152, in eval_images
    d = torch.cat((d, model(data.view(-1, 1, 64, 64).float()).view(data.size()[0], 100)))
  File "/Users/evgeniya/PycharmProjects/svp/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/Users/evgeniya/PycharmProjects/svp/Net.py", line 116, in forward
    x = self.layer12(x)
  File "/Users/evgeniya/PycharmProjects/svp/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/Users/evgeniya/PycharmProjects/svp/venv/lib/python3.6/site-packages/torch/nn/modules/container.py", line 100, in forward
    input = module(input)
  File "/Users/evgeniya/PycharmProjects/svp/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/Users/evgeniya/PycharmProjects/svp/venv/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 106, in forward
    exponential_average_factor, self.eps)
  File "/Users/evgeniya/PycharmProjects/svp/venv/lib/python3.6/site-packages/torch/nn/functional.py", line 1923, in batch_norm
    training, momentum, eps, torch.backends.cudnn.enabled

Should I assume, that the torch.cat operation is responsible for the error or it could be caused by something before?
    d = torch.cat((d, model(data.view(-1, 1, 64, 64).float()).view(data.size()[0], 100)))

I have checked the posts regarding this problem and I have found out, that in most cases torch.cat was not the problem.