make tensor.expand create a tensor from correct type, not default type.