You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling AccuracyCalculator(device="cpu") instead of AccuracyCalculator(device=torch.device("cpu")) crashes with an unclear exception (AttributeError: 'str' object has no attribute 'type').
It'd be better to check if isinstance(device, str), and then do device=torch.device(device)