Properties
Basic¤
Data Access¤
realize
¤
realize()
Computes this tensor by running every recorded op it depends on once, elementwise chains as one fused call. Returns self.
Source code in stackgrad/tensor.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
numpy
¤
numpy()
The data as a NumPy array on the host (a copy).
Source code in stackgrad/tensor.py
391 392 393 | |
to
¤
to(device=None, dtype=None)
This tensor outside the graph, on device in dtype ("bfloat16", ...); None keeps the current one.
Source code in stackgrad/tensor.py
383 384 385 386 387 388 389 | |
detach
¤
detach()
Return a tensor sharing this data but cut out of the graph.
Source code in stackgrad/tensor.py
378 379 380 | |