Echo-Ji / ST-SSL

ST-SSL (STSSL): Spatio-Temporal Self-Supervised Learning for Traffic Flow Forecasting/Prediction
142 stars 28 forks source link

RuntimeError #8

Closed turmony closed 3 months ago

turmony commented 3 months ago

File "D:\tfp_pro\ST-SSL-main\model\aug.py", line 54, in aug_topology drop_prob = torch.softmax(sim_mx[edge_mask], dim=0) RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) clone到本地运行遇到了这个问题

turmony commented 3 months ago

drop_prob = torch.softmax(sim_mx[edge_mask.to('cpu')], dim=0) 问题解决了