File size: 341 Bytes
643929e | 1 2 3 4 5 6 7 8 9 10 11 12 | from windformer import WindFormerDist
import torch
if __name__ == '__main__':
device = 'cuda' if torch.cuda.is_available() else 'cpu'
net_path = './windformer.pkl'
model = WindFormerDist(fusion=False).to(device)
model.load_state_dict(torch.load(net_path, map_location=device)['model_weights'])
model.eval()
|