Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/pytorch
/ float
Method
float
torch/storage.py:158–160 ·
view source on GitHub ↗
Casts this storage to float type.
(self)
Source
from the content-addressed store, hash-verified
156
return
self._to(torch.double)
157
158
def
float(self):
159
""
"Casts this storage to float type."
""
160
return
self._to(torch.float)
161
162
def
half(self):
163
""
"Casts this storage to half type."
""
Callers
15
_tensor_str
Function · 0.45
test
Function · 0.45
test
Function · 0.45
test
Function · 0.45
test_self_attn_TxT_attn_mask
Method · 0.45
test_transformerencoder_square_input
Method · 0.45
get_a_test_layer
Method · 0.45
test_scaled_dot_product_fused_attention_vs_math_cpu
Method · 0.45
decode
Method · 0.45
test_cuda_half
Method · 0.45
test_dtype
Method · 0.45
test_to
Method · 0.45
Calls
1
_to
Method · 0.95
Tested by
15
test_self_attn_TxT_attn_mask
Method · 0.36
test_transformerencoder_square_input
Method · 0.36
get_a_test_layer
Method · 0.36
test_scaled_dot_product_fused_attention_vs_math_cpu
Method · 0.36
decode
Method · 0.36
test_cuda_half
Method · 0.36
test_dtype
Method · 0.36
test_to
Method · 0.36
mixed_type_producer
Function · 0.36
_test_mixed_types_cuda_sharing
Method · 0.36
get_tensor_from_raw_BGR
Function · 0.36
test_load_tensor
Method · 0.36