id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
pytorch_torch_tensor_functions/Pytorch_Documentations_55_7.txt
[ ` StorageReader ` ](distributed.checkpoint.html#torch.distributed.checkpoint.StorageReader) * [ ` StorageWriter ` ](distributed.checkpoint.html#torch.distributed.checkpoint.StorageWriter) * [ ` LoadPlanner ` ](distributed.checkpoint.html#torch.distributed.checkpoint.LoadPlanner) * [ ` LoadPlan ` ](dis...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_320_0.txt
# torch.allclose ¶ torch. allclose ( _ input _ , _ other _ , _ rtol = 1e-05 _ , _ atol = 1e-08 _ , _ equal_nan = False _ ) → [ bool ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.12\)") ¶ This function checks if ` input ` and ` other ` satisfy the condition: ∣ inpu...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_333_0.txt
# torch.logical_or ¶ torch. logical_or ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the element-wise logical OR of the given input tensors. Zeros are treated as ` False ` and nonzeros are treated as ` True ` . Parameters...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_78_0.txt
# torch.sspaddmm ¶ torch. sspaddmm ( _ input _ , _ mat1 _ , _ mat2 _ , _ * _ , _ beta = 1 _ , _ alpha = 1 _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Matrix multiplies a sparse tensor ` mat1 ` with a dense tensor ` mat2 ` , then adds the sparse tensor `...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_149_0.txt
# torch.Tensor.fill_diagonal_ ¶ Tensor. fill_diagonal_ ( _ fill_value _ , _ wrap = False _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Fill the main diagonal of a tensor that has at least 2-dimensions. When dims>2, all dimensions of input must be of equal length. This function mod...
pytorch_torch_tensor_functions/Pytorch_Documentations_21_3.txt
test = gradcheck(linear, input, eps=1e-6, atol=1e-4) print(test) See [ Numerical gradient checking ](../autograd.html#grad-check) for more details on finite-difference gradient comparisons. If your function is used in higher order derivatives (differentiating the backward pass) you can use the ` gradgradch...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_226_0.txt
# torch.histogram ¶ torch. histogram ( _ input _ , _ bins _ , _ * _ , _ range = None _ , _ weight = None _ , _ density = False _ , _ out = None _ ) ¶ Computes a histogram of the values in a tensor. ` bins ` can be an integer or a 1D tensor. If ` bins ` is an int, it specifies the numbe...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_26.txt
ch.qint8 >>> qm = Quantize(scale, zero_point, dtype) >>> quantized_input = qm(input) >>> dqm = DeQuantize() >>> dequantized = dqm(quantized_input) >>> print(dequantized) tensor([[ 1., -1.], [ 1., -1.]], dtype=torch.float32) ### Linear ¶ _class_ ` torch.nn.quantized. ` ` Line...
pytorch_torch_tensor_functions/Pytorch_Documentations_47_2.txt
er an input image composed of several input planes. See [ ` Conv3d ` ](generated/torch.nn.Conv3d.html#torch.nn.Conv3d "torch.nn.Conv3d") for details and output shape. Note In some circumstances when using the CUDA backend with CuDNN, this operator may select a nondeterministic algorithm to increase performance. If ...
pytorch_torch_tensor_functions/Pytorch_Documentations_55_9.txt
](linalg.html#misc) * [ Experimental Functions ](linalg.html#experimental-functions) * [ torch.monitor ](monitor.html) * [ API Reference ](monitor.html#module-torch.monitor) * [ torch.signal ](signal.html) * [ torch.signal.windows ](signal.html#module-torch.signal.windows) * [ torch.special ](special...
pytorch_torch_tensor_functions/Memory Management_2_0.txt
# Overview of PYTORCH_CUDA_ALLOC_CONF **PYTORCH_CUDA_ALLOC_CONF** is a configuration option introduced in PyTorch to enhance memory management and allocation for deep learning applications utilizing CUDA. It is designed to optimize GPU memory allocation and improve performance during training and inference processes....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_200_0.txt
# torch.arctan ¶ torch. arctan ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.atan() ` ](torch.atan.html#torch.atan "torch.atan") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_470_0.txt
# torch.Tensor.ndimension ¶ Tensor. ndimension ( ) → [ int ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") ¶ Alias for [ ` dim() ` ](torch.Tensor.dim.html#torch.Tensor.dim "torch.Tensor.dim")
pytorch_torch_tensor_functions/Pytorch_Documentations_31_1.txt
mon preprocessing and integration tasks needed for incorporating ML in mobile applications. ## Save your model torch.jit.script(model).save("my_mobile_model.pt") ## iOS prebuilt binary pod ‘LibTorch’ ## Android prebuilt binary implementation 'org.pytorch:pytorch_andro...
pytorch_torch_tensor_functions/Pytorch_Documentations_9_11.txt
. Edge ![](_static/img/ExecuTorch-Logo- cropped.svg) ](https://pytorch.org/executorch/stable/demo-apps-android.html) #### [ Lowering a Model as a Delegate Learn to accelerate your program using ExecuTorch by applying delegates through three methods: lowering the whole module, composing it with another module, and p...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_2.txt
need to be able to represent quantized data in Tensors. A Quantized Tensor allows for storing quantized data (represented as int8/uint8/int32) along with quantization parameters like scale and zero_point. Quantized Tensors allow for many useful operations making quantized arithmetic easy, in addition to allowing for se...
pytorch_torch_tensor_functions/Pytorch_Documentations_25_12.txt
_Optimizer_ ) – Wrapped optimizer. * **base_lr** ( [ _float_ ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.8\)") _or_ [ _list_ ](https://docs.python.org/3/library/stdtypes.html#list "\(in Python v3.8\)") ) – Initial learning rate which is the lower boundary in the cycle for each paramete...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_376_0.txt
# torch.logaddexp2 ¶ torch. logaddexp2 ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Logarithm of the sum of exponentiations of the inputs in base-2. Calculates pointwise log ⁡ 2 ( 2 x \+ 2 y ) \log_2\left(2^x +
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_170_0.txt
# torch.max ¶ torch. max ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns the maximum value of all elements in the ` input ` tensor. Warning This function produces deterministic (sub)gradients unlike ` max(dim=0) ` Parameters **input** ( [ _Tensor_ ](../ten...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_437_0.txt
# torch.tril ¶ torch. tril ( _ input _ , _ diagonal = 0 _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns the lower triangular part of the matrix (2-D tensor) or batch of matrices ` input ` , the other elements of the result tensor ` out ` are se...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_137_0.txt
# torch.Tensor.xlogy ¶ Tensor. xlogy ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_58_13.txt
ler) ](optim.html#torch.optim.lr_scheduler.CyclicLR) ---|--- ## D * [ data() (torch.nn.utils.rnn.PackedSequence property) ](generated/torch.nn.utils.rnn.PackedSequence.html#torch.nn.utils.rnn.PackedSequence.data) * [ data_parallel() (in module torch.nn.parallel) ](nn.functional.html#torch.nn.parallel.dat...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_263_0.txt
# torch.broadcast_to ¶ torch. broadcast_to ( _ input _ , _ shape _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Broadcasts ` input ` to the shape ` shape ` . Equivalent to calling `
pytorch_torch_tensor_functions/Pytorch_Documentations_50_2.txt
torch binaries provided: one compiled with GCC pre-cxx11 ABI and the other with GCC cxx11 ABI, and you should make the selection based on the GCC ABI your system is using. [ Next ![](_static/images/chevron-right-orange.svg) ](torch.html "torch") [ ![](_static/images/chevron-right-orange.svg) Previous ](notes/windows.h...
pytorch_torch_tensor_functions/Pytorch_Documentations_15_2.txt
ytorch.org) * [ Github Issues ](https://github.com/pytorch/pytorch/issues) * [ Brand Guidelines ](https://pytorch.org/assets/brand-guidelines/PyTorch-Brand-Guidelines.pdf) * Stay Connected * Email Address [ ](https://www.facebook.com/pytorch) [ ](https://twitter.com/pytorch) [ ](https://www.youtube.com/pyto...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_370_0.txt
# torch.Tensor.to_sparse_bsr ¶ Tensor. to_sparse_bsr ( _ blocksize _ , _ dense_dim _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Convert a tensor to a block sparse row (BSR) storage format of given blocksize. If the ` self ` is strided, then the number of dense dimensions could be s...
pytorch_torch_tensor_functions/Pytorch_Documentations_39_1.txt
ide additional automatic runtime correctness checks 2. propagate names from input tensors to output tensors Below is a list of all operations that are supported with named tensors and their associated name inference rules. If you don’t see an operation listed here, but it would help your use case, please [ searc...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_17.txt
](_modules/torch/nn/qat/modules/conv.html#Conv2d) ¶ A Conv2d module attached with FakeQuantize modules for both output activation and weight, used for quantization aware training. We adopt the same interface as torch.nn.Conv2d , please see [ https://pytorch.org/docs/stable/nn.html?highlight=conv2d#torch.nn.C...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_460_0.txt
# torch.ormqr ¶ torch. ormqr ( _ input _ , _ tau _ , _ other _ , _ left = True _ , _ transpose = False _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the matrix-matrix multiplication of a product of Householder matrices with a general matri...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_514_0.txt
# torch.floor_divide ¶ torch. floor_divide ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Note Before PyTorch 1.13 ` torch.floor_divide() ` incorrectly performed truncation division. To restore the previous behavior use [ ` torch....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_447_0.txt
# torch.sigmoid ¶ torch. sigmoid ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.special.expit() ` ](../special.html#torch.special.expit "torch.special.expit") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_6_0.txt
# torch.resolve_neg ¶ torch. resolve_neg ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with materialized negation if ` input ` ’s negative bit is set to True , else returns ` input ` . The output tensor will always have its negative bit set to False...
pytorch_torch_tensor_functions/Pytorch_Documentations_9_1.txt
er_tutorial.html) * [ Optimizing Vision Transformer Model for Deployment ](beginner/vt_tutorial.html) * [ Whole Slide Image Classification Using PyTorch and TIAToolbox ](intermediate/tiatoolbox_tutorial.html) Audio * [ Audio I/O ](beginner/audio_io_tutorial.html) * [ Audio Resampling ](beginner/audio_resampli...
pytorch_torch_tensor_functions/Pytorch_Documentations_25_15.txt
x ​ . It has been proposed in [ SGDR: Stochastic Gradient Descent with Warm Restarts ](https://arxiv.org/abs/1608.03983) . Parameters * **optimizer** ( _Optimizer_ ) – Wrapped optimizer. * **T_0** ( [ _int_ ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.8\)") ) – Number of it...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_22.txt
.gradcheck) * [ gradgradcheck() (in module torch.autograd) ](autograd.html#torch.autograd.gradgradcheck) * [ GradScaler (class in torch.cuda.amp) ](amp.html#torch.cuda.amp.GradScaler) * [ graph() (torch.jit.ScriptModule property) ](generated/torch.jit.ScriptModule.html#torch.jit.ScriptModule.graph) * [ Grayscal...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_3.txt
torch.Tensor method) ](tensors.html#torch.Tensor.addmv_) * [ addr() (in module torch) ](generated/torch.addr.html#torch.addr) * [ (torch.Tensor method) ](tensors.html#torch.Tensor.addr) * [ addr_() (torch.Tensor method) ](tensors.html#torch.Tensor.addr_) * [ adjust_brightness() (in module torchvision.transfor...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_327_0.txt
# torch.deg2rad ¶ torch. deg2rad ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with each of the elements of ` input ` converted from angles in degrees to radians. Parameters **input** ( [ _Tensor_ ](../tensors.html#t...
pytorch_torch_tensor_functions/Pytorch_Documentations_60_2.txt
utograd primitives, initialization must take place. To initialize the RPC framework we need to use ` init_rpc() ` which would initialize the RPC framework, RRef framework and distributed autograd. ` torch.distributed.rpc. ` ` init_rpc ` ( _name_ , _backend=BackendType.PROCESS_GROUP_ , _rank=-1_ , _world_size=None_ ...
pytorch_torch_tensor_functions/Pytorch_Documentations_63_3.txt
>> torch.randn((2,3), device=1) # legacy ## torch.layout ¶ _class_ ` torch. ` ` layout ` ¶ A ` torch.layout ` is an object that represents the memory layout of a [ ` torch.Tensor ` ](tensors.html#torch.Tensor "torch.Tensor") . Currently, we support ` torch.strided ` (dense Tensors) and have beta su...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_324_0.txt
# torch.masked_select ¶ torch. masked_select ( _ input _ , _ mask _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new 1-D tensor which indexes the ` input ` tensor according to the boolean mask ` mask ` which is a BoolTensor . The shapes of ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_319_0.txt
# torch.all ¶ torch. all ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Tests if all elements in ` input ` evaluate to True . Note This function matches the behaviour of NumPy in returning output of dtype bool for all supported dtypes except uint8 . For uint8 the d...
pytorch_torch_tensor_functions/Pytorch_Documentations_59_7.txt
... >>> # should give same set of data as range(3, 7), i.e., [3, 4, 5, 6]. >>> ds = MyIterableDataset(start=3, end=7) >>> # Single-process loading >>> print(list(torch.utils.data.DataLoader(ds, num_workers=0))) [3, 4, 5, 6] >>> # Mult-process loading with two worker processes >>> #...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_199_0.txt
# torch.Tensor.requires_grad ¶ Tensor. requires_grad ¶ Is ` True ` if gradients need to be computed for this Tensor, ` False ` otherwise. Note The fact that gradients need to be computed for a Tensor do not mean that the [ ` grad ` ](torch.Tensor.grad.html#torch.Tensor.grad "torch.Tensor.grad") attrib...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_192_0.txt
# torch.lerp ¶ torch. lerp ( _ input _ , _ end _ , _ weight _ , _ * _ , _ out = None _ ) ¶ Does a linear interpolation of two tensors ` start ` (given by ` input ` ) and ` end ` based on a scalar or tensor ` weight ` and returns the resulting ` out ` tensor. out i = start i \+ weight i...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_190_0.txt
# torch.Tensor.geometric_ ¶ Tensor. geometric_ ( _ p _ , _ * _ , _ generator = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Fills ` self ` tensor with elements drawn from the geometric distribution: P ( X = k ) = ( 1 − p ) k − 1 p , k = 1 , 2 , . ....
pytorch_torch_tensor_functions/Pytorch_Documentations_51_0.txt
[ ](https://pytorch.org) * [ Get Started ](/get-started) * Ecosystem [ PyTorch Conference - 2024 September 18-19 in San Francisco ](https://events.linuxfoundation.org/pytorch-conference/) [ Tools Learn about the tools and frameworks in the PyTorch Ecosystem ](/ecosystem) * Edge [ About PyTorch Edge ](/e...
pytorch_torch_tensor_functions/Pytorch_Documentations_47_4.txt
in_channels , groups out_channels ​ , k T , k H , k W ) * **bias** – optional bias of shape ( out_channels ) (\text{out\\_channels}) ( out_channels ) . Default: None * **stride** – the stride of the convolving kernel. Can be a single number or a tuple ` (sT, sH, sW) ` . Default: 1 ...
pytorch_torch_tensor_functions/Solve_CUDA_out_of_memory_4_1.txt
aders/) * [ Data Scientists ](/why-sc/data-scientists/) * [ Software Engineers ](/why-sc/engineers/) ##### Get Started * [ Saturn Cloud on AWS ](/plans/enterprise/) * [ Saturn Cloud on GCP ](/plans/gcp/) * [ Saturn Cloud on Azure ](/plans/azure/) * [ Saturn Cloud on OCI ](/plans/oracle/) ##### Resource...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_136_0.txt
# torch.sgn ¶ torch. sgn ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ This function is an extension of torch.sign() to complex tensors. It computes a new tensor whose elements have the same angles as the corresponding elements of ` input ` and ...
pytorch_torch_tensor_functions/Solve_CUDA_out_of_memory_2_0.txt
## How to Solve ‘CUDA out of memory’ in PyTorch ### Solution #1: Reduce Batch Size or Use Gradient Accumulation As we mentioned earlier, one of the most common causes of the ‘CUDA out of memory’ error is using a batch size that’s too large. If you’re encountering this error, try reducing your batch size and see if ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_316_0.txt
# torch.Tensor.ndim ¶ Tensor. ndim ¶ Alias for [ ` dim() ` ](torch.Tensor.dim.html#torch.Tensor.dim "torch.Tensor.dim")
pytorch_torch_tensor_functions/Pytorch_Documentations_57_5.txt
ne_ ) [ [source] ](_modules/torch/distributions/categorical.html#Categorical) ¶ Bases: ` torch.distributions.distribution.Distribution ` Creates a categorical distribution parameterized by either ` probs ` or ` logits ` (but not both). Note It is equivalent to the distribution that [ ` torch.multinomia...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_7.txt
vers to select the scale factor and bias based on observed tensor data are provided, developers can provide their own quantization functions. Quantization can be applied selectively to different parts of the model or configured differently for different parts of the model. We also provide support for per channel quant...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_501_0.txt
# torch.Tensor.log2 ¶ Tensor. log2 ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_64_0.txt
# torch.Tensor.index_copy_ ¶ Tensor. index_copy_ ( _ dim _ , _ index _ , _ tensor _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Copies the elements of [ ` tensor ` ](torch.tensor.html#torch.tensor "torch.tensor") into the ` self ` tensor by selecting the indices in the order given...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_267_0.txt
# torch.erfinv ¶ torch. erfinv ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.special.erfinv() ` ](../special.html#torch.special.erfinv "torch.special.erfinv") .
pytorch_torch_tensor_functions/Pytorch_Documentations_58_20.txt
.TransformerDecoderLayer method) ](generated/torch.nn.TransformerDecoderLayer.html#torch.nn.TransformerDecoderLayer.forward) * [ (torch.nn.TransformerEncoder method) ](generated/torch.nn.TransformerEncoder.html#torch.nn.TransformerEncoder.forward) * [ (torch.nn.TransformerEncoderLayer method) ](generated/torch....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_167_0.txt
# torch.Tensor.storage_offset ¶ Tensor. storage_offset ( ) → [ int ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") ¶ Returns ` self ` tensor’s offset in the underlying storage in terms of number of storage elements (not bytes). Example: >>> x = torch.tensor...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_317_0.txt
# torch.Tensor.indices ¶ Tensor. indices ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Return the indices tensor of a [ sparse COO tensor ](../sparse.html#sparse- coo-docs) . Warning Throws an error if ` self ` is not a sparse COO tensor.
pytorch_torch_tensor_functions/Pytorch_Documentations_33_0.txt
[ ](https://pytorch.org/) * [ Get Started ](https://pytorch.org/get-started) * Ecosystem [ Models (Beta) Discover, publish, and reuse pre-trained models ](https://pytorch.org/hub) [ Tools & Libraries Explore the ecosystem of tools and libraries ](https://pytorch.org/ecosystem) * [ Mobile ](https://pytorch....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_430_0.txt
# torch.Tensor.imag ¶ Tensor. imag ¶ Returns a new tensor containing imaginary values of the ` self ` tensor. The returned tensor and ` self ` share the same underlying storage. Warning [ ` imag() ` ](torch.imag.html#torch.imag "torch.imag") is only supported for tensors with complex dtypes. Example:...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_5_0.txt
# torch.argmin ¶ torch. argmin ( _ input _ , _ dim = None _ , _ keepdim = False _ ) → LongTensor ¶ Returns the indices of the minimum value(s) of the flattened tensor or along a dimension This is the second value returned by [ ` torch.min() `
pytorch_torch_tensor_functions/Pytorch_Documentations_55_1.txt
cuda_memory.html#using-the-visualizer) * [ Snapshot API Reference ](torch_cuda_memory.html#snapshot-api-reference) * [ torch.mps ](mps.html) * [ torch.xpu ](xpu.html) * [ Meta device ](meta.html) * [ torch.backends ](backends.html) * [ torch.export ](export.html) * [ torch.distributed ](distributed.html) ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_496_0.txt
# torch.permute ¶ torch. permute ( _ input _ , _ dims _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a view of the original tensor ` input ` with its dimensions permuted. Parameters * **input** ( [ _Tensor_ ](../tensors.html#torch.Tensor "torch.Tensor") ) – the inpu...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_116_0.txt
# torch.Tensor.addr ¶ Tensor. addr ( _ vec1 _ , _ vec2 _ , _ * _ , _ beta = 1 _ , _ alpha = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_7_27.txt
ization scale of the output, type: double. * **zero_point** \- quantization zero point of the output, type: long. ### InstanceNorm1d ¶ _class_ ` torch.nn.quantized. ` ` InstanceNorm1d ` ( _num_features_ , _weight_ , _bias_ , _scale_ , _zero_point_ , _eps=1e-05_ , _momentum=0.1_ , _affine=False_ , _track_runni...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_251_0.txt
# torch.neg ¶ torch. neg ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the negative of the elements of ` input ` . out = − 1 × input \text{out} = -1 \times \text{input} out = − 1 × input Parameters *...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_154_0.txt
# torch.abs ¶ torch. abs ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the absolute value of each element in ` input ` . out i = ∣ input i ∣ \text{out}_{i} = |\text{input}_{i}| out i ​ = ∣ input i ​ ∣ Parameters ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_283_1.txt
inalg.matrix_norm() ` ](torch.linalg.matrix_norm.html#torch.linalg.matrix_norm "torch.linalg.matrix_norm") with ` ord='fro' ` aligns with the mathematical definition, since it can only be applied across exactly two dimensions. Example: >>> import torch >>> a = torch.arange(9, dtype= torch.float) -...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_306_0.txt
# torch.not_equal ¶ torch. not_equal ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.ne() ` ](torch.ne.html#torch.ne "torch.ne") .
pytorch_torch_tensor_functions/Pytorch_Documentations_25_9.txt
source] ](_modules/torch/optim/lr_scheduler.html#StepLR) ¶ Decays the learning rate of each parameter group by gamma every step_size epochs. Notice that such decay can happen simultaneously with other changes to the learning rate from outside this scheduler. When last_epoch=-1, sets initial lr as lr. Parameters...
pytorch_torch_tensor_functions/Pytorch_Documentations_37_10.txt
2 4 6 [torch.FloatTensor of size (3,)] >>> h.remove() # removes the hook ` retain_grad ` ( ) [ [source] ](_modules/torch/tensor.html#Tensor.retain_grad) ¶ Enables .grad attribute for non-leaf Tensors. ## Function ¶ _class_ ` torch.autograd. ` ` Function ` [ [source] ](_module...
pytorch_torch_tensor_functions/Pytorch_Documentations_62_4.txt
available) ¶ Checks if the NCCL backend is available. * * * Currently three initialization methods are supported: ### TCP initialization ¶ There are two ways to initialize using TCP, both requiring a network address reachable from all processes and a desired ` world_size ` . The first way requires specify...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_31_0.txt
# torch.select_scatter ¶ torch. select_scatter ( _ input _ , _ src _ , _ dim _ , _ index _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Embeds the values of the ` src ` tensor into ` input ` at the given index. This function returns a tensor with fresh storage; it does not create ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_29_0.txt
# torch.asin ¶ torch. asin ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the arcsine of the elements of ` input ` . out i = sin ⁡ − 1 ( input i ) \text{out}_{i} = \sin^{-1}(\text{input}_{i}) out i ​ = s...
pytorch_torch_tensor_functions/Pytorch_Documentations_33_1.txt
t on tape-based autograd systems. ## The PyTorch Contribution Process ¶ The PyTorch organization is governed by [ PyTorch Governance ](governance.html) . The PyTorch development process involves a healthy amount of open discussions between the core development team and the community. PyTorch operates similar to m...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_175_0.txt
# torch.Tensor.igamma ¶ Tensor. igamma ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_380_0.txt
# torch.Tensor.unfold ¶ Tensor. unfold ( _ dimension _ , _ size _ , _ step _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a view of the original tensor which contains all slices of size [ ` size ` ](torch.Tensor.size.html#torch.Tensor.size "torch.Tensor.size") from ` self `...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_1.txt
or ` torch.float ` | ` torch.FloatTensor ` | ` torch.cuda.FloatTensor ` 64-bit floating point | ` torch.float64 ` or ` torch.double ` | ` torch.DoubleTensor ` | ` torch.cuda.DoubleTensor ` 16-bit floating point 1 | ` torch.float16 ` or ` torch.half ` | ` torch.HalfTensor ` | ` torch.cuda.HalfT...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_5.txt
of the observed tensor inputs (per tensor variant) * ` MovingAverageMinMaxObserver ` — Derives the quantization parameters from the running averages of the minimums and maximums of the observed tensor inputs (per tensor variant) * ` PerChannelMinMaxObserver ` — Derives the quantization parameters from th...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_45.txt
ndOptions.rpc_timeout) * [ RpcBackendOptions (class in torch.distributed.rpc) ](rpc.html#torch.distributed.rpc.RpcBackendOptions) * [ Rprop (class in torch.optim) ](optim.html#torch.optim.Rprop) * [ RRef (class in torch.distributed.rpc) ](rpc.html#torch.distributed.rpc.RRef) * [ RReLU (class in torch.nn) ](gene...
pytorch_torch_tensor_functions/Pytorch_Documentations_67_0.txt
[ ](https://pytorch.org/) * [ Get Started ](https://pytorch.org/get-started) * Ecosystem [ Models (Beta) Discover, publish, and reuse pre-trained models ](https://pytorch.org/hub) [ Tools & Libraries Explore the ecosystem of tools and libraries ](https://pytorch.org/ecosystem) * [ Mobile ](https://pytorch....
pytorch_torch_tensor_functions/Pytorch_Documentations_19_1.txt
le * ![](/assets/images/logo-github.svg) * * octoml-profile is a python library and cloud service designed to provide a simple experience for assessing and optimizing the performance of PyTorch models. ](https://github.com/octoml/octoml-profile) [ * raster-vision * ![](/assets/images/logo-github.svg) ...
pytorch_torch_tensor_functions/Pytorch_Documentations_59_1.txt
batching , * single- and multi-process data loading , * automatic memory pinning . These options are configured by the constructor arguments of a ` DataLoader ` , which has signature: DataLoader(dataset, batch_size=1, shuffle=False, sampler=None, batch_sampler=None, num_worke...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_25.txt
s.html#torch.Tensor.index_copy) * [ index_copy_() (torch.Tensor method) ](tensors.html#torch.Tensor.index_copy_) * [ index_fill() (torch.Tensor method) ](tensors.html#torch.Tensor.index_fill) * [ index_fill_() (torch.Tensor method) ](tensors.html#torch.Tensor.index_fill_) * [ index_put() (torch.Tensor method) ]...
pytorch_torch_tensor_functions/Pytorch_Documentations_59_6.txt
e.g., a lambda function. See [ Multiprocessing best practices ](notes/multiprocessing.html#multiprocessing-best-practices) on more details related to multiprocessing in PyTorch. Warning ` len(dataloader) ` heuristic is based on the length of the sampler used. When ` dataset ` is an ` IterableDataset ` , it inste...
pytorch_torch_tensor_functions/Pytorch_Documentations_47_5.txt
in k H × k W kH \times kW k H × k W regions by step size s H × s W sH \times sW s H × s W steps. The number of output features is equal to the number of input planes. See [ ` AvgPool2d ` ](generated/torch.nn.AvgPool2d.html#torch.nn.AvgPool2d "torch.nn.AvgPool2d") for details and output shape. ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_33_0.txt
# torch.Tensor.expm1 ¶ Tensor. expm1 ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_315_0.txt
# torch.Tensor.scatter_add_ ¶ Tensor. scatter_add_ ( _ dim _ , _ index _ , _ src _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Adds all values from the tensor ` src ` into ` self ` at the indices specified in the ` index ` tensor in a similar fashion as [ ` scatter_() ` ](torch....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_436_0.txt
# torch.mean ¶ torch. mean ( _ input _ , _ * _ , _ dtype = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns the mean value of all elements in the ` input ` tensor. Parameters **input** ( [ _Tensor_ ](../tensors.html#torch.Tensor "torch.Tensor") ) – the input ten...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_57.txt
s.html#torch.distributions.categorical.Categorical.variance) * [ (torch.distributions.cauchy.Cauchy property) ](distributions.html#torch.distributions.cauchy.Cauchy.variance) * [ (torch.distributions.continuous_bernoulli.ContinuousBernoulli property) ](distributions.html#torch.distributions.continuous_bernoulli...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_7.txt
ting point ` dtype ` , and the result will have the same ` dtype ` . See [ ` torch.bernoulli() ` ](generated/torch.bernoulli.html#torch.bernoulli "torch.bernoulli") ` bernoulli_ ` ( ) ¶ ` bernoulli_ ` ( _p=0.5_ , _*_ , _generator=None_ ) → Tensor Fills each location of ` self ` with an independe...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_339_0.txt
# torch.Tensor.element_size ¶ Tensor. element_size ( ) → [ int ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") ¶ Returns the size in bytes of an individual element. Example: >>> torch.tensor([]).element_size() 4 >>> torch.tensor([], dtype=torch.uint8...
pytorch_torch_tensor_functions/Pytorch_Documentations_67_2.txt
a list of available entrypoint names Return type entrypoints Example >>> entrypoints = torch.hub.list('pytorch/vision', force_reload=True) ` torch.hub. ` ` help ` ( _github_ , _model_ , _force_reload=False_ ) [ [source] ](_modules/torch/hub.html#help) ¶ Show the docstring ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_277_0.txt
# torch.adjoint ¶ torch. adjoint ( _ Tensor _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a view of the tensor conjugated and with the last two dimensions transposed. ` x.adjoint() ` is equivalent to ` x.transpose(-2, -1).conj() ` for complex tensors and to ` x.transpose(...
pytorch_torch_tensor_functions/Pytorch_Documentations_9_6.txt
Use TorchRL to code a DDPG Loss Reinforcement- Learning ![](_static/img/half_cheetah.gif) ](advanced/coding_ddpg.html) #### [ Writing your environment and transforms Use TorchRL to code a Pendulum Reinforcement-Learning ![](_static/img/pendulum.gif) ](advanced/pendulum.html) #### [ Deploying PyTorch in Python via...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_4.txt
method) ](generated/torch.nn.utils.prune.LnStructured.html#torch.nn.utils.prune.LnStructured.apply) * [ (torch.nn.utils.prune.PruningContainer class method) ](generated/torch.nn.utils.prune.PruningContainer.html#torch.nn.utils.prune.PruningContainer.apply) * [ (torch.nn.utils.prune.RandomStructured class metho...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_347_0.txt
# torch.as_strided ¶ torch. as_strided ( _ input _ , _ size _ , _ stride _ , _ storage_offset = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Create a view of an existing torch.Tensor ` input ` with specified ` size ` , ` stride ` and ` storage_offset ` . Warning Pref...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_46_0.txt
# torch.isposinf ¶ torch. isposinf ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Tests if each element of ` input ` is positive infinity or not. Parameters **input** ( [ _Tensor_ ](../tensors.html#torch.Tensor "torch.Tensor") ) – the inp...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_23.txt
C. However this acts mostly coordinate-wise (except for the final normalization), and thus is appropriate for coordinate-wise optimization algorithms. _class_ ` torch.distributions.transforms. ` ` StickBreakingTransform ` ( _cache_size=0_ ) [ [source] ](_modules/torch/distributions/transforms.html#StickBreakingTransf...