I want to define a double tensor and use its elements for later calculation, and I need them in doublefloat or float64.
But result turns out all elements are only float.
Did I do anything wrong ?

When you do A[0,0], you get a python number.
Python numbers can only be int or float. These naming have nothing to do with precision and can represent respectively the LongTensor and DoubleTensor types.

If you work with a Tensor of type DoubleTensor, all your operations will have a double precision.
If you perform operations that return a python number, then you get the precision of a python number: https://docs.python.org/2/library/stdtypes.html#typesnumeric (which is in general equivalent to a C double).

Given that the precision of the python number is as much as the most precise Tensor type, you can use python numbers as well.
But if you do so, you need to be careful when using the autograd as it will return a Variable containing a Tensor with one element (to be able to keep track of the history) instead of a python number. So always working with Tensors is the best!