log10_¶
Documentation¶
-
treetensor.torch.
log10_
(input)[source]¶ In-place version of
log10()
.Examples:
>>> import torch >>> import treetensor.torch as ttorch >>> t = ttorch.tensor([-4.0, -1.0, 0, 2.0, 4.8, 8.0]) >>> ttorch.log10_(t) >>> t tensor([ nan, nan, -inf, 0.3010, 0.6812, 0.9031]) >>> t = ttorch.tensor({ ... 'a': [-4.0, -1.0, 0, 2.0, 4.8, 8.0], ... 'b': {'x': [[-2.0, 1.2, 0.25], ... [16.0, 3.75, -2.34]]}, ... }) >>> ttorch.log10_(t) >>> t <Tensor 0x7ff90a4acdc0> ├── a --> tensor([ nan, nan, -inf, 0.3010, 0.6812, 0.9031]) └── b --> <Tensor 0x7ff90a4acf40> └── x --> tensor([[ nan, 0.0792, -0.6021], [ 1.2041, 0.5740, nan]])
Torch Version Related
This documentation is based on torch.log10_ in torch v1.9.0+cu102. Its arguments’ arrangements depend on the version of pytorch you installed.
If some arguments listed here are not working properly, please check your pytorch’s version with the following command and find its documentation.
1 | python -c 'import torch;print(torch.__version__)' |