if torch.cuda.is_available(): print(f"Using NVIDIA GPU") self.device = torch.device("cuda")elif torch.backends.mps.is_available(): print(f"Using Metal Acceleration (MPS) on Apple GPU") self.device = torch.device("mps")else: print("Using CPU") self.device = torch.device("cpu")No comments yet. Be the first to share your thoughts.