Relative Content

Tag Archive for pythonnumpypytorch

‘numpy.ndarray’ object has no attribute ‘cpu’ in GNN pytorch

I’m trying to run this Graph Neural Networks: “https://github.com/guoshnBJTU/ASTGNN” on kaggle, the code still gives me the run summary via wandb however still the status is “Failed” on the website, I wanted to know if it is a problem with the model or with wandb, would anyone be able to help me? At the end of the train after doing all 80 epochs I get this error:

Checking if two numpy arrays created from torch tensors are equal freeze program

I’m currently dealing with PyTorch and Numpy, and I ran across a weird issue. When I run the program, which is simply a PyTorch autoencoder for the MNIST digit dataset, on my windows pc (with cuda), it works just fine. However, when I try to run it on my macbook with either cpu/mps, the program freeze whenever I convert two certain tensors to numpy and check if they are equal.