フリー問題

PyTorch Certified Associate のフリー問題 5 / 20 問目

問題文

A team writes torch.tensor([1, 2, 3]) and torch.tensor([1.0, 2.0, 3.0]) in the same script, then is surprised that the two tensors report different dtypes. Which description of the default behavior is correct?

選択肢

  1. The dtype is inferred from the Python data, so the integer list gives an integer tensor and the float list gives a floating point tensor.
  2. Both calls produce the same floating point dtype, and every PyTorch tensor is stored internally as a floating point buffer.
  3. The dtype depends on the current device, not on the data.
  4. The dtype is always the 64-bit float type unless the tensor is moved to a GPU.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。