title: How to use map_location='cpu' due to "RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False"
body: <p>I was trying to download the following model at <a href="https://pytorch.org/hub/nvidia_deeplearningexamples_tacotron2/" rel="nofollow noreferrer">https://pytorch.org/hub/nvidia_deeplearningexamples_tacotron2/</a></p>
  
  <pre><code>import torch
  tacotron2 = torch.hub.load('nvidia/DeepLearningExamples:torchhub', 'nvidia_tacotron2')
  </code></pre>
  
  <p>I received:</p>
  
  <pre><code>&gt;&gt;&gt; import torch
  &gt;&gt;&gt; tacotron2 = torch.hub.load('nvidia/DeepLearningExamples:torchhub', 'nvidia_tacotron2')
  Using cache found in .cache\torch\hub\nvidia_DeepLearningExamples_torchhub
  ...
    File "Anaconda3\envs\env3_pytorch\lib\site-packages\torch\serialization.py", line 79, in validate_cuda_device
      raise RuntimeError('Attempting to deserialize object on a CUDA '
  RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU.
  </code></pre>
  
  <p>So I used the following with <code>map_location='cpu'</code>, but still get the same error.</p>
  
  <pre><code>&gt;&gt;&gt; tacotron2 = torch.hub.load('nvidia/DeepLearningExamples:torchhub', 'nvidia_tacotron2', map_location='cpu')
  </code></pre>
  
  <p>torch.version.cuda shows a version but torch.cuda.is_available() is false.</p>
  
  <pre><code>&gt;&gt;&gt; import torch
  &gt;&gt;&gt; torch.version.cuda
  '9.0'
  &gt;&gt;&gt; torch.cuda.is_available()
  False
  </code></pre>
  
  <ul>
  <li><p>How to get around this error related to <code>map_location</code> as I used exactly the command error message asked to use?</p></li>
  <li><p>How can I use cuda in loading the model?</p></li>
  </ul>