I opened an  issue  here  1, but I havn’t recieved  reply.
I encountered an error while running the Char RNN tutorial from the official PyTorch docs(here 3).
I got this error:
Traceback (most recent call last):
  File "names.py", line 86, in <module>
    rnn = RNN(n_letters, n_hidden, n_categories)
  File "names.py", line 72, in __init__
    self.i2o = nn.Linear(input_size + hidden_size, output_size)
  File "/home/ayush99/anaconda3/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 46, in __init__
    self.reset_parameters()
  File "/home/ayush99/anaconda3/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 49, in reset_parameters
    stdv = 1. / math.sqrt(self.weight.size(1))
RuntimeError: invalid argument 2: dimension 1 out of range of 0D tensor at /opt/conda/conda-bld/pytorch-cpu_1518282373170/work/torch/lib/TH/generic/THTensor.c:24

System specs: I was running this on the CPU.
Why is this happening? The examples from the docs should work just fine.