pytorch

Adding and multiplying matrices in PyTorch

Part 1 IN: A = torch.tensor([1,2]) B = torch.tensor([[1,2],[2,4]]) print(A+B) OUT: tensor([[2, 4], [3, 6]]) ... ensor([[-7,5],[2,-1]]) print(A*B) OUT: RuntimeError Question: And why can't I multiply the matrices A(3x2) and B (2x2)?

Video card error, python

I am writing my first GAN neural network in pytorch. During training, the error CUDA error: an illegal memory access was enco ... och: {epoch} Loss D.: {loss_discriminator}\n" + f"Epoch: {epoch} Loss G.: {generator_loss}")

Access to ZIP archive folders in Google Colab

A zip archive has been uploaded to google colab "plates.zip", there are 2 directories inside it. How to get the output of t ... import os import zipfile data_root = '../plates.zip/plates/' print(os.listdir(data_root)) How do I do this correctly?