id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_359_0.txt
# torch.Tensor.div ¶ Tensor. div ( _ value _ , _ * _ , _ rounding_mode = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_187_0.txt
# torch.nan_to_num ¶ torch. nan_to_num ( _ input _ , _ nan = 0.0 _ , _ posinf = None _ , _ neginf = None _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Replaces ` NaN ` , positive infinity, and negative infinity values in ` input ` with the values...
pytorch_torch_tensor_functions/Pytorch_Documentations_27_15.txt
)
pytorch_torch_tensor_functions/Pytorch_Documentations_0_4.txt
ike "torch.ones_like") or [ ` zeros_like() ` ](../generated/torch.zeros_like.html#torch.zeros_like "torch.zeros_like") are provided as convenient helper functions (which also preserve ` torch.device ` and ` torch.dtype ` of a Tensor). x_cpu = torch.empty(2, 3) x_gpu = torch.empty(2, 3) y_...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_214_0.txt
# torch.Tensor.register_hook ¶ Tensor. register_hook ( _ hook _ ) [ [source] ](../_modules/torch/_tensor.html#Tensor.register_hook) ¶ Registers a backward hook. The hook will be called every time a gradient with respect to the Tensor is computed. The hook should have the following signature: ...
pytorch_torch_tensor_functions/Pytorch_Documentations_52_4.txt
max2d") | Applies SoftMax over features to each spatial location. [ ` nn.LogSoftmax ` ](generated/torch.nn.LogSoftmax.html#torch.nn.LogSoftmax "torch.nn.LogSoftmax") | Applies the log ⁡ ( Softmax ( x ) ) \log(\text{Softmax}(x)) lo g ( Softmax ( x ) ) function to an n-dimensional input Tensor. ...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_34.txt
(torch.Tensor method) ](tensors.html#torch.Tensor.mean) | * [ median() (in module torch) ](generated/torch.median.html#torch.median) , [ [1] ](generated/torch.median.html#torch.median) * [ (torch.Tensor method) ](tensors.html#torch.Tensor.median) * [ memory_allocated() (in module torch.cuda) ](cuda.html#torch...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_500_0.txt
# torch.Tensor.adjoint ¶ Tensor. adjoint ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` adjoint() ` ](torch.adjoint.html#torch.adjoint "torch.adjoint")
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_191_0.txt
# torch.Tensor.igammac ¶ Tensor. igammac ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_21_5.txt
lementations for ` ScalarTensor ` . Note Using a global dispatch table is not a mandated part of the ` __torch_function__ ` API, it is just a useful design pattern for structuring your override implementations. This class definition isn’t quite enough to make ` torch.mean ` do the right thing when we pass it a ` ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_428_0.txt
# torch.fmod ¶ torch. fmod ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Applies C++’s [ std::fmod ](https://en.cppreference.com/w/cpp/numeric/math/fmod) entrywise. The result has the same sign as the dividend ` input ` and its abs...
pytorch_torch_tensor_functions/Memory Management_6_0.txt
# Conclusion In summary, PYTORCH_CUDA_ALLOC_CONF provides a valuable tool for developers working with PyTorch and CUDA, offering a range of configuration options to optimize memory allocation and utilization. By leveraging this feature, deep learning practitioners can effectively manage memory resources, reduce memor...
pytorch_torch_tensor_functions/Pytorch_Documentations_16_1.txt
alf ` ). Some ops, like linear layers and convolutions, are much faster in ` float16 ` . Other ops, like reductions, often require the dynamic range of ` float32 ` . Mixed precision tries to match each op to its appropriate datatype. Ordinarily, “automatic mixed precision training” uses ` torch.cuda.amp.autocast ...
pytorch_torch_tensor_functions/Pytorch_Documentations_28_2.txt
llocate memory ¶ You may have some code that tries to recover from out of memory errors. try: run_model(batch_size) except RuntimeError: # Out of memory for _ in range(batch_size): run_model(1) But find that when you do run out of memory, your recovery code can’t a...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_180_0.txt
# torch.remainder ¶ torch. remainder ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes [ Python’s modulus operation ](https://docs.python.org/3/reference/expressions.html#binary-arithmetic- operations) entrywise. The result has ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_229_0.txt
# torch.Tensor.values ¶ Tensor. values ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Return the values 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_torch_tensor_functions_230_0.txt
# torch.Tensor.sgn ¶ Tensor. sgn ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_25_2.txt
at Tensors should be optimized. * **defaults** – (dict): a dict containing default values of optimization options (used when a parameter group doesn’t specify them). ` add_param_group ` ( _param_group_ ) [ [source] ](_modules/torch/optim/optimizer.html#Optimizer.add_param_group) ¶ Add a param group to th...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_520_0.txt
# torch.Tensor.type ¶ Tensor. type ( _ dtype = None _ , _ non_blocking = False _ , _ ** kwargs _ ) → str or Tensor ¶ Returns the type if dtype is not provided, else casts this object to the specified type. If this is already of the correct type, no copy is performed and the original object ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_130_0.txt
# torch.Tensor.new_empty ¶ Tensor. new_empty ( _ size _ , _ * _ , _ dtype = None _ , _ device = None _ , _ requires_grad = False _ , _ layout = torch.strided _ , _ pin_memory = False _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a Tensor of size [ ` size ` ](t...
pytorch_torch_tensor_functions/Pytorch_Documentations_16_2.txt
ors _in_ an autocast-enabled region are a bug; if this is what you observe, please file an issue. ` autocast(enabled=False) ` subregions can be nested in autocast-enabled regions. Locally disabling autocast can be useful, for example, if you want to force a subregion to run in a particular ` dtype ` . Disabling auto...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_476_0.txt
# torch.Tensor.set_ ¶ Tensor. set_ ( _ source = None _ , _ storage_offset = 0 _ , _ size = None _ , _ stride = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Sets the underlying storage, size, and strides. If ` source ` is a tensor, ` self ` tensor will share the same...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_205_1.txt
, 2, 0, 0, 0], [0, 0, 3, 0, 0]]) >>> index = torch.tensor([[0, 1, 2], [0, 1, 4]]) >>> torch.zeros(3, 5, dtype=src.dtype).scatter_(1, index, src) tensor([[1, 2, 3, 0, 0], [6, 7, 0, 0, 8], [0, 0, 0, 0, 0]]) >>> torch.full((2, 4), 2.).scatter_(1, torch.tensor([[2], ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_148_0.txt
# torch.clone ¶ torch. clone ( _ input _ , _ * _ , _ memory_format = torch.preserve_format _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a copy of ` input ` . Note This function is differentiable, so gradients will flow back from the result of this operation to ` input ...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_16.txt
σ 2 ( l n x − μ ) 2 ​ ` logaddexp ` ( _other_ ) → Tensor ¶ See [ ` torch.logaddexp() ` ](generated/torch.logaddexp.html#torch.logaddexp "torch.logaddexp") ` logaddexp2 ` ( _other_ ) → Tensor ¶ See [ ` torch.logaddexp2() ` ](generated/torch.logaddexp2.html#torch.logaddexp2 "torch.logadd...
pytorch_torch_tensor_functions/Pytorch_Documentations_59_11.txt
* [ Tutorials ](https://pytorch.org/tutorials) * [ Docs ](https://pytorch.org/docs/stable/index.html) * [ Resources ](https://pytorch.org/resources) * [ Github ](https://github.com/pytorch/pytorch)
pytorch_torch_tensor_functions/Pytorch_Documentations_60_12.txt
g the backward pass. We use the provided roots to discover the autograd graph and compute appropriate dependencies. This method blocks until the entire autograd computation is done. We accumulate the gradients in the appropriate ` torch.distributed.autograd.context ` on each of the nodes. The autograd context to be...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_492_0.txt
# torch.Tensor.expand_as ¶ Tensor. expand_as ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Expand this tensor to the same size as ` other ` . ` self.expand_as(other) ` is equivalent to ` self.expand(other.size()) ` . Please see [ ` expand() ` ](torch.Tensor.expand.html#...
pytorch_torch_tensor_functions/Pytorch_Documentations_33_5.txt
the codebase more robust * Promoting PyTorch * Triaging issues * About open source development * Common Mistakes To Avoid * Frequently asked questions * On Documentation * Python Docs * C++ Docs * Tutorials * Tutorials Build Overview * Contributing a ne...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_106_0.txt
# torch.Tensor.clip ¶ Tensor. clip ( _ min = None _ , _ max = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` clamp() ` ](torch.Tensor.clamp.html#torch.Tensor.clamp "torch.Tensor.clamp") .
pytorch_torch_tensor_functions/Pytorch_Documentations_52_10.txt
* Normalization Layers * Recurrent Layers * Transformer Layers * Linear Layers * Dropout Layers * Sparse Layers * Distance Functions * Loss Functions * Vision Layers * DataParallel Layers (multi-GPU, distributed) * Utilities * Quantized Functions ![](https:/...
pytorch_torch_tensor_functions/Pytorch_Documentations_60_13.txt
-algorithms) to apply the gradients on each worker. _class_ ` torch.distributed.optim. ` ` DistributedOptimizer ` ( _optimizer_class_ , _params_rref_ , _*args_ , _**kwargs_ ) [ [source] ](_modules/torch/distributed/optim/optimizer.html#DistributedOptimizer) ¶ DistributedOptimizer takes remote references to par...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_342_0.txt
# torch.Tensor.nan_to_num ¶ Tensor. nan_to_num ( _ nan = 0.0 _ , _ posinf = None _ , _ neginf = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_245_0.txt
# torch.Tensor.to ¶ Tensor. to ( _ * args _ , _ ** kwargs _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Performs Tensor dtype and/or device conversion. A [ ` torch.dtype ` ](../tensor_attributes.html#torch.dtype "torch.dtype") and [ ` torch.device ` ](../tensor_attributes.html#to...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_216_0.txt
# torch.Tensor.index_reduce_ ¶ Tensor. index_reduce_ ( _ dim _ , _ index _ , _ source _ , _ reduce _ , _ * _ , _ include_self = True _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Accumulate the elements of ` source ` into the ` self ` tensor by accumulating to the indices in ...
pytorch_torch_tensor_functions/Pytorch_Documentations_43_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_33_2.txt
ed ¶ ### Proposing new features ¶ New feature ideas are best discussed on a specific issue. Please include as much information as you can, any accompanying data, and your proposed solution. The PyTorch team and community frequently reviews new issues and comments where they think they can help. If you feel confide...
pytorch_torch_tensor_functions/Pytorch_Documentations_27_13.txt
h.matrix_power") | Returns the matrix raised to the power ` n ` for square matrices. [ ` matrix_rank ` ](generated/torch.matrix_rank.html#torch.matrix_rank "torch.matrix_rank") | Returns the numerical rank of a 2-D tensor. [ ` mm ` ](generated/torch.mm.html#torch.mm "torch.mm") | Performs a matrix multiplic...
pytorch_torch_tensor_functions/Pytorch_Documentations_9_10.txt
al.html) #### [ Getting Started with Distributed RPC Framework Learn how to build distributed training using the torch.distributed.rpc package. Parallel-and- Distributed-Training ![](_static/img/thumbnails/cropped/Getting Started with Distributed-RPC-Framework.png) ](intermediate/rpc_tutorial.html) #### [ Implemen...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_169_0.txt
# torch.Tensor.ne ¶ Tensor. ne ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_58_16.txt
mal.entropy) * [ (torch.distributions.multivariate_normal.MultivariateNormal method) ](distributions.html#torch.distributions.multivariate_normal.MultivariateNormal.entropy) * [ (torch.distributions.normal.Normal method) ](distributions.html#torch.distributions.normal.Normal.entropy) * [ (torch.distribution...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_76_0.txt
# torch.Tensor.unsqueeze ¶ Tensor. unsqueeze ( _ dim _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_5_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_42_0.txt
# torch.repeat_interleave ¶ torch. repeat_interleave ( _ input _ , _ repeats _ , _ dim = None _ , _ * _ , _ output_size = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Repeat elements of a tensor. Warning This is different from [ ` torch.Tensor.repeat() ` ](torch.Tenso...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_15.txt
U1d ¶ _class_ ` torch.nn.intrinsic. ` ` ConvReLU1d ` ( _conv_ , _relu_ ) [ [source] ](_modules/torch/nn/intrinsic/modules/fused.html#ConvReLU1d) ¶ This is a sequential container which calls the Conv 1d and ReLU modules. During quantization this will be replaced with the corresponding fused module. ### Con...
pytorch_torch_tensor_functions/Pytorch_Documentations_24_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_39_10.txt
ons ¶ Factory functions now take a new ` names ` argument that associates a name with each dimension. >>> torch.zeros(2, 3, names=('N', 'C')) tensor([[0., 0., 0.], [0., 0., 0.]], names=('N', 'C')) ## out function and in-place variants ¶ A tensor specified as an ` out= ` tenso...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_21.txt
torch.geqrf.html#torch.geqrf) * [ (torch.Tensor method) ](tensors.html#torch.Tensor.geqrf) * [ ger() (in module torch) ](generated/torch.ger.html#torch.ger) * [ (torch.Tensor method) ](tensors.html#torch.Tensor.ger) * [ get_all_sharing_strategies() (in module torch.multiprocessing) ](multiprocessing.html#to...
pytorch_torch_tensor_functions/Pytorch_Documentations_37_15.txt
s created and stashed for backward. Thus, the ` seq=<N> ` annotation associated with each forward function range tells you that if a backward Function object is created by this forward function, the backward object will receive sequence number N. During the backward pass, the top-level range wrapping each C++ backward ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_300_0.txt
# torch.swapdims ¶ torch. swapdims ( _ input _ , _ dim0 _ , _ dim1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.transpose() ` ](torch.transpose.html#torch.transpose "torch.transpose") . This function is equivalent to NumPy’s swapaxes function. Examples: ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_441_0.txt
# torch.sinc ¶ torch. sinc ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.special.sinc() ` ](../special.html#torch.special.sinc "torch.special.sinc") .
pytorch_torch_tensor_functions/Pytorch_Documentations_61_2.txt
imizer2 ` ), you may call ` scaler.unscale_(optimizer2) ` separately to unscale those parameters’ gradients as well. ### Gradient clipping ¶ Calling ` scaler.unscale_(optimizer) ` before clipping enables you to clip unscaled gradients as usual: scaler = GradScaler() for epoch in epochs: ...
pytorch_torch_tensor_functions/Pytorch_Documentations_27_2.txt
"torch.from_numpy") | Creates a [ ` Tensor ` ](tensors.html#torch.Tensor "torch.Tensor") from a [ ` numpy.ndarray ` ](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "\(in NumPy v1.19\)") . [ ` zeros ` ](generated/torch.zeros.html#torch.zeros "torch.zeros") | Returns a tensor f...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_96_0.txt
# torch.isreal ¶ torch. isreal ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with boolean elements representing if each element of ` input ` is real-valued or not. All real-valued types are considered real. Complex values are considered real when their...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_431_0.txt
# torch.Tensor.addmm ¶ Tensor. addmm ( _ mat1 _ , _ mat2 _ , _ * _ , _ beta = 1 _ , _ alpha = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_15_0.txt
# torch.fmin ¶ torch. fmin ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the element-wise minimum of ` input ` and ` other ` . This is like [ ` torch.minimum() ` ](torch.minimum.html#torch.minimum "torch.minimum") excep...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_468_0.txt
# torch.Tensor.unique ¶ Tensor. unique ( _ sorted = True _ , _ return_inverse = False _ , _ return_counts = False _ , _ dim = None _ ) [ [source] ](../_modules/torch/_tensor.html#Tensor.unique) ¶ Returns the unique elements of the input tensor.
pytorch_torch_tensor_functions/Visualizing_PyTorch_memory_1_0.txt
## Generating Memory Snapshots with Traces Like snapshots, we have to enable memory recording: torch.cuda.memory._record_memory_history( # keep a maximum 100,000 alloc/free events from before the snapshot max_entries=100000) We limit the total size of the trace event buffe...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_12.txt
frac() ` ](generated/torch.frac.html#torch.frac "torch.frac") ` frac_ ` ( ) → Tensor ¶ In-place version of ` frac() ` ` gather ` ( _dim_ , _index_ ) → Tensor ¶ See [ ` torch.gather() ` ](generated/torch.gather.html#torch.gather "torch.gather") ` ge ` ( _other_ ) → Tensor ¶ See [ ` t...
pytorch_torch_tensor_functions/Pytorch_Documentations_48_1.txt
or Export Type * ONNX * ONNX_ATEN * ONNX_ATEN_FALLBACK * RAW * ONNX_FALLTHROUGH * Frequently Asked Questions * Use external data format * Training * Functions ## Example: End-to-end AlexNet from PyTorch to ONNX ¶ Here is a simple script which exports a pretrained AlexN...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_8_0.txt
# torch.exp ¶ torch. exp ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the exponential of the elements of the input tensor ` input ` . y i = e x i y_{i} = e^{x_{i}} y i ​ = e x i ​ Parameters **in...
pytorch_torch_tensor_functions/Pytorch_Documentations_25_14.txt
v3.8\)") ) – {‘cos’, ‘linear’} Specifies the annealing strategy: “cos” for cosine annealing, “linear” for linear annealing. Default: ‘cos’ * **cycle_momentum** ( [ _bool_ ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.8\)") ) – If ` True ` , momentum is cycled inversely to learning rate be...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_350_0.txt
# torch.nanmean ¶ torch. nanmean ( _ input _ , _ dim = None _ , _ keepdim = False _ , _ * _ , _ dtype = None _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the mean of all non-NaN elements along the specified dimensions. This function is identi...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_40_0.txt
# torch.polygamma ¶ torch. polygamma ( _ n _ , _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.special.polygamma() ` ](../special.html#torch.special.polygamma "torch.special.polygamma") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_408_0.txt
# torch.Tensor.shape ¶ Tensor. shape ¶ Returns the size of the ` self ` tensor. Alias for [ ` size ` ](torch.Tensor.size.html#torch.Tensor.size "torch.Tensor.size") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_73_0.txt
# torch.ldexp ¶ torch. ldexp ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Multiplies ` input ` by 2 ** ` other ` . out i = input i ∗ 2 i other \text{{out}}_i = \text{{input}}_i * 2^\text{{other}}_i out i ​ = input ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_88_0.txt
# torch.lu_solve ¶ torch. lu_solve ( _ b _ , _ LU_data _ , _ LU_pivots _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns the LU solve of the linear system A x = b Ax = b A x = b using the partially pivoted LU factorization of A from [ ` lu_f...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_247_0.txt
# torch.Tensor.q_per_channel_scales ¶ Tensor. q_per_channel_scales ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Given a Tensor quantized by linear (affine) per-channel quantization, returns a Tensor of scales of the underlying quantizer. It has the number of elements that matches the ...
pytorch_torch_tensor_functions/Pytorch_Documentations_0_5.txt
synchronous execution * CUDA streams * Memory management * cuFFT plan cache * Best practices * Device-agnostic code * Use pinned memory buffers * Use nn.parallel.DistributedDataParallel instead of multiprocessing or nn.DataParallel ![](https://www.googleadservices.com/pagead...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_512_0.txt
# torch.Tensor.index_reduce ¶ Tensor. index_reduce ( ) ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_67_3.txt
ogress** ( [ _bool_ ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.8\)") _,_ _optional_ ) – whether or not to display a progress bar to stderr. Default: True * **check_hash** ( [ _bool_ ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.8\)") _,_ _optional_ ) – If True,...
pytorch_torch_tensor_functions/Pytorch_Documentations_35_6.txt
pytorch) [ ](https://www.youtube.com/pytorch) To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: [...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_218_0.txt
# torch.numel ¶ torch. numel ( _ input _ ) → [ int ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") ¶ Returns the total number of elements in the ` input ` tensor. Parameters **input** ( [ _Tensor_ ](../tensors.html#torch.Tensor "torch.Tensor") ) – the input tensor...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_398_0.txt
# torch.inner ¶ torch. inner ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the dot product for 1D tensors. For higher dimensions, sums the product of elements from ` input ` and ` other ` along their last dimension. Note...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_60_0.txt
# torch.Tensor.is_inference ¶ Tensor. is_inference ( ) → [ bool ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.12\)") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_46_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_522_0.txt
# torch.Tensor.backward ¶ Tensor. backward ( _ gradient = None _ , _ retain_graph = None _ , _ create_graph = False _ , _ inputs = None _ ) [ [source] ](../_modules/torch/_tensor.html#Tensor.backward) ¶ Computes the gradient of current tensor wrt graph leaves. The graph is differentiated usi...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_506_0.txt
# torch.Tensor.scatter ¶ Tensor. scatter ( _ dim _ , _ index _ , _ src _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Out-of-place version of [ ` torch.Tensor.scatter_() ` ](torch.Tensor.scatter_.html#torch.Tensor.scatter_ "torch.Tensor.scatter_")
pytorch_torch_tensor_functions/Pytorch_Documentations_43_1.txt
g includes logic to juggle the RNG state such that checkpointed passes making use of RNG (through dropout for example) have deterministic output as compared to non-checkpointed passes. The logic to stash and restore RNG states can incur a moderate performance hit depending on the runtime of checkpointed operations. If ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_451_0.txt
# torch.nonzero ¶ torch. nonzero ( _ input _ , _ * _ , _ out = None _ , _ as_tuple = False _ ) → LongTensor or tuple of LongTensors ¶ Note ` torch.nonzero(..., as_tuple=False) ` (default) returns a 2-D tensor where each row is the index for a nonzero value. ` torch.nonzero(..., as_tuple...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_390_0.txt
# torch.sub ¶ torch. sub ( _ input _ , _ other _ , _ * _ , _ alpha = 1 _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Subtracts ` other ` , scaled by ` alpha ` , from ` input ` . out i = input i − alpha × other i \text{{out}}_i = \text{{input}}_i ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_102_0.txt
# torch.Tensor.where ¶ Tensor. where ( _ condition _ , _ y _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ ` self.where(condition, y) ` is equivalent to ` torch.where(condition,
pytorch_torch_tensor_functions/Pytorch_Documentations_42_2.txt
ystem. Please use Windows and Python 64-bit version. ### Import error ¶ from torch._C import * ImportError: DLL load failed: The specified module could not be found. The problem is caused by the missing of the essential files. Actually, we include almost all the essential files that PyT...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_302_0.txt
# torch.Tensor.bitwise_xor ¶ Tensor. bitwise_xor ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_145_0.txt
# torch.Tensor.acosh ¶ Tensor. acosh ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_0_1.txt
created on that device. The selected device can be changed with a [ ` torch.cuda.device ` ](../cuda.html#torch.cuda.device "torch.cuda.device") context manager. However, once a tensor is allocated, you can do operations on it irrespective of the selected device, and the results will be always placed in on the same de...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_92_0.txt
# torch.amin ¶ torch. amin ( _ input _ , _ dim _ , _ keepdim = False _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns the minimum value of each slice of the ` input ` tensor in the given dimension(s) ` dim ` . Note The difference between ` ma...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_24.txt
module torchvision.transforms.functional) ](torchvision/transforms.html#torchvision.transforms.functional.hflip) * [ hinge_embedding_loss() (in module torch.nn.functional) ](nn.functional.html#torch.nn.functional.hinge_embedding_loss) * [ HingeEmbeddingLoss (class in torch.nn) ](generated/torch.nn.HingeEmbeddingLos...
pytorch_torch_tensor_functions/Pytorch_Documentations_13_2.txt
e() tensor([1.5708, 0.7854]) ## Linear Algebra ¶ Currently, there is very minimal linear algebra operation support for complex tensors. We currently support [ ` torch.mv() ` ](generated/torch.mv.html#torch.mv "torch.mv") , [ ` torch.svd() ` ](generated/torch.svd.html#torch.svd "torch.svd") , [ ` torch.qr...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_1_1.txt
tps://docs.python.org/3/library/functions.html#bool "\(in Python v3.12\)") ) – Whether ` input ` was padded on both sides so that the t t t -th frame is centered at time t × hop_length t \times \text{hop\\_length} t × hop_length . (Default: ` True ` ) * **normalized** ( [ _bool_ ](https://docs.python....
pytorch_torch_tensor_functions/Pytorch_Documentations_31_3.txt
Docs ](/docs) * [ PyTorch ](/docs) * [ torchaudio ](/audio) * [ torchtext ](/text) * [ torchvision ](/vision) * [ torcharrow ](/torcharrow) * [ TorchData ](/data) * [ TorchRec ](/torchrec) * [ TorchServe ](/serve) * [ PyTorch on XLA Devices ](/xla/release/1.6/index.html) * Resourc...
pytorch_torch_tensor_functions/Pytorch_Documentations_9_4.txt
alize data and model training. Interpretability,Getting- Started,TensorBoard ![](_static/img/thumbnails/cropped/visualizing-with- tensorboard.png) ](intermediate/tensorboard_tutorial.html) #### [ TorchVision Object Detection Finetuning Tutorial Finetune a pre- trained Mask R-CNN model. Image/Video ![](_static/img/...
pytorch_torch_tensor_functions/Pytorch_Documentations_53_1.txt
* Disable JIT for Debugging * Inspecting Code * Interpreting Graphs * Tracer * Frequently Asked Questions * Appendix * Migrating to PyTorch 1.2 Recursive Scripting API * References TorchScript is a way to create serializable and optimizable models from PyTorch code. Any TorchScr...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_250_0.txt
# torch.Tensor.cumsum ¶ Tensor. cumsum ( _ dim _ , _ dtype = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_278_0.txt
# torch.Tensor.arcsin ¶ Tensor. arcsin ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_36_2.txt
parse. ` ` FloatTensor ` ¶ ` add ` ( ) ¶ ` add_ ` ( ) ¶ ` clone ` ( ) ¶ ` dim ` ( ) ¶ ` div ` ( ) ¶ ` div_ ` ( ) ¶ ` get_device ` ( ) ¶ ` hspmm ` ( ) ¶ ` mm ` ( ) ¶ ` mul ` ( ) ¶ ` mul_ ` ( ) ¶ ` narrow_copy ` ( )...
pytorch_torch_tensor_functions/Pytorch_Documentations_47_11.txt
followed by a logarithm. While mathematically equivalent to log(softmax(x)), doing these two operations separately is slower, and numerically unstable. This function uses an alternative formulation to compute the output and gradient correctly. See [ ` LogSoftmax ` ](generated/torch.nn.LogSoftmax.html#torch.nn.LogSof...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_19.txt
sides of the input. Can be a single number or a tuple (padH, padW) . Default: 0 * **dilation** – the spacing between kernel elements. Can be a single number or a tuple (dH, dW) . Default: 1 * **groups** – split input into groups, in_channels \text{in\\_channels} in_channels should be divisible by the nu...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_37_0.txt
# torch.Tensor.unique_consecutive ¶ Tensor. unique_consecutive ( _ return_inverse = False _ , _ return_counts = False _ , _ dim = None _ ) [ [source] ](../_modules/torch/_tensor.html#Tensor.unique_consecutive) ¶ Eliminates all but the first element from every consecutive group of equivalent elem...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_25_0.txt
# torch.Tensor.erf ¶ Tensor. erf ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶