VincLee8188 / GMAN-PyTorch

Implementation of Graph Muti-Attention Network with PyTorch
134 stars 30 forks source link

AttributeError: 'numpy.bytes_' object has no attribute 'delta #12

Open moghadas76 opened 10 months ago

moghadas76 commented 10 months ago

AttributeError: 'numpy.bytes_' object has no attribute 'delta'. Did you mean: 'data'?

loading data... Traceback (most recent call last): File "/kaggle/working/GMAN-PyTorch/main.py", line 60, in testY, SE, mean, std) = loaddata(args) File "/kaggle/working/GMAN-PyTorch/utils/utils.py", line 78, in load_data // time.freq.delta.total_seconds()

serenaand commented 9 months ago

change the code in utils_.py ,the def load_data(args): function change ”timeofday = (time.hour 3600 + time.minute 60 + time.second) \ // time.freq.delta.total_seconds()”
to ‘’timeofday = (time.hour 3600 + time.minute 60 + time.second) // args.time_slot timeofday = torch.reshape(torch.tensor(timeofday), (-1, 1))‘’