Valid NCA-GENM Dumps shared by ExamDiscuss.com for Helping Passing NCA-GENM Exam! ExamDiscuss.com now offer the newest NCA-GENM exam dumps, the ExamDiscuss.com NCA-GENM exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com NCA-GENM dumps with Test Engine here:
Consider this python code using PyTorch. What will be the output of the following code snippet, especially concerning the device used for computation?
Correct Answer: C
The torch.cuda.is_available() function checks if CUDA is available and torch.device sets the device to 'cuda' if available, otherwise 'cpu'. The tensor is created on the appropriate device and therefore 'my_tensor.is_cuda' will return true, thus the output will be 'Tensor on CPU: False'. Even if cuda is not available the programm will work on CPU.