Hello Yegane (and @ptrblck)!
To add some pytorch version 0.3.0 color to this discussion, I can’t get
this “use constructor to cast” approach to work either.  (But I get a more
informative pytorch error, rather than a segmentation fault.)
(Note, that in terms of your original problem, I can use .double(),
i.e., (a.double() * b.double()).float()) works for me.)
Contrary to the (quite limited) documentation, I cannot construct
a DoubleTensor from a FloatTensor, nor vice versa:
import torch
torch.__version__

tf = torch.FloatTensor (2, 3)
type (tf)
td = torch.DoubleTensor (3, 4)
type (td)

torch.DoubleTensor (tf)
torch.FloatTensor (td)

tfd = tf.double()
type (tfd)
tdf = td.float()
type (tdf)

>>> import torch
>>> torch.__version__
'0.3.0b0+591e73e'
>>>
>>> tf = torch.FloatTensor (2, 3)
>>> type (tf)
<class 'torch.FloatTensor'>
>>> td = torch.DoubleTensor (3, 4)
>>> type (td)
<class 'torch.DoubleTensor'>
>>>
>>> torch.DoubleTensor (tf)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: torch.DoubleTensor constructor received an invalid combination of arguments - got (torch.FloatTensor), but expected one of:
 * no arguments
 * (int ...)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.FloatTensore[0m)
 * (torch.DoubleTensor viewed_tensor)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.FloatTensore[0m)
 * (torch.Size size)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.FloatTensore[0m)
 * (torch.DoubleStorage data)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.FloatTensore[0m)
 * (Sequence data)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.FloatTensore[0m)

>>> torch.FloatTensor (td)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: torch.FloatTensor constructor received an invalid combination of arguments - got (torch.DoubleTensor), but expected one of:
 * no arguments
 * (int ...)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.DoubleTensore[0m)
 * (torch.FloatTensor viewed_tensor)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.DoubleTensore[0m)
 * (torch.Size size)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.DoubleTensore[0m)
 * (torch.FloatStorage data)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.DoubleTensore[0m)
 * (Sequence data)
      didn't match because some of the arguments have invalid types: (e[31;1mtorch.DoubleTensore[0m)

>>>
>>> tfd = tf.double()
>>> type (tfd)
<class 'torch.DoubleTensor'>
>>> tdf = td.float()
>>> type (tdf)
<class 'torch.FloatTensor'>

Best.
K. Frank