(t)
| 189 | # Backward compatibility fixes |
| 190 | |
| 191 | def to_python_float(t): |
| 192 | if hasattr(t, 'item'): |
| 193 | return t.item() |
| 194 | else: |
| 195 | return t[0] |
| 196 | |
| 197 | TORCH_MAJOR = int(torch.__version__.split('.')[0]) |
| 198 | TORCH_MINOR = int(torch.__version__.split('.')[1]) |
nothing calls this directly
no outgoing calls
no test coverage detected