id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
pytorch_torch_tensor_functions/Pytorch_Documentations_53_10.txt
fd/sphinx_rtd_theme) provided by [ Read the Docs ](https://readthedocs.org) . * TorchScript * Creating TorchScript Code * Mixing Tracing and Scripting * TorchScript Language * Built-in Functions and Modules * PyTorch Functions and Modules * Python Functions and Modules * Pyth...
pytorch_torch_tensor_functions/Pytorch_Documentations_62_3.txt
URL specifying how to initialize the process group. Default is “env://” if no ` init_method ` or ` store ` is specified. Mutually exclusive with ` store ` . * **world_size** ( [ _int_ ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.8\)") _,_ _optional_ ) – Number of processes participatin...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_310_0.txt
# torch.prod ¶ torch. prod ( _ input _ , _ * _ , _ dtype = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns the product of all elements in the ` input ` tensor. Parameters **input** ( [ _Tensor_ ](../tensors.html#torch.Tensor "torch.Tensor") ) – the input tensor...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_13.txt
ance. Manages the probability of selecting component. The number of categories must match the rightmost batch dimension of the component_distribution . Must have either scalar batch_shape or batch_shape matching component_distribution.batch_shape[:-1] * **component_distribution** – torch.distributions.Distr...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_222_0.txt
# torch.float_power ¶ torch. float_power ( _ input _ , _ exponent _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Raises ` input ` to the power of ` exponent ` , elementwise, in double precision. If neither input is complex returns a ` torch.float64 ` te...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_255_0.txt
# torch.Tensor.neg ¶ Tensor. neg ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Memory Management_0_0.txt
[ Open in app ](https://rsci.app.link/?%24canonical_url=https%3A%2F%2Fmedium.com%2Fp%2Fdabe7adec130&%7Efeature=LoOpenInAppButton&%7Echannel=ShowPostUnderUser&source=---two_column_layout_nav----------------------------------) Sign up [ Sign in ](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fiamhol...
pytorch_torch_tensor_functions/Pytorch_Documentations_12_4.txt
bove) are discarded for [ ` torch.autograd.backward() ` ](../autograd.html#torch.autograd.backward "torch.autograd.backward") on a complex scalar (e.g., this is equivalent to dropping the imaginary part of the loss before performing a backwards). For any other desired behavior, you can specify the covector grad_outp...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_498_0.txt
# torch.arctan2 ¶ torch. arctan2 ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.atan2() ` ](torch.atan2.html#torch.atan2 "torch.atan2") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_330_0.txt
# torch.roll ¶ torch. roll ( _ input _ , _ shifts _ , _ dims = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Roll the tensor ` input ` along the given dimension(s). Elements that are shifted beyond the last position are re-introduced at the first position. If ` dims ` is N...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_22.txt
/library/functions.html#int "\(in Python v3.8\)") ) – the axis along which to index * **index** ( _LongTensor_ ) – the indices of elements to scatter, can be either empty or the same size of src. When empty, the operation returns identity * **src** ( _Tensor_ ) – the source element(s) to scatter, incase value...
pytorch_torch_tensor_functions/Pytorch_Documentations_60_11.txt
ate a helper proxy to easily launch an ` rpc_sync ` using the owner of the RRef as the destination to run functions on the object referenced by this RRef. More specifically, ` rref.rpc_sync().func_name(*args, **kwargs) ` is the same as the following: >>> def run(rref, func_name, args, kwargs): >>>...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_67_0.txt
# torch.chunk ¶ torch. chunk ( _ input _ , _ chunks _ , _ dim = 0 _ ) → List of Tensors ¶ Attempts to split a tensor into the specified number of chunks. Each chunk is a view of the input tensor. Note This function may return fewer than the specified number of chunks!
pytorch_torch_tensor_functions/Pytorch_Documentations_52_1.txt
Layers * Transformer Layers * Linear Layers * Dropout Layers * Sparse Layers * Distance Functions * Loss Functions * Vision Layers * DataParallel Layers (multi-GPU, distributed) * Utilities * Quantized Functions [ ` Parameter ` ](generated/torch.nn.parameter.Parameter.html#to...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_183_0.txt
# torch.rot90 ¶ torch. rot90 ( _ input _ , _ k = 1 _ , _ dims = [0, 1] _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Rotate an n-D tensor by 90 degrees in the plane specified by dims axis. Rotation direction is from the first towards the second axis if k > 0, and from the seco...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_404_0.txt
# torch.unsqueeze ¶ torch. unsqueeze ( _ input _ , _ dim _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with a dimension of size one inserted at the specified position. The returned tensor shares the same underlying data with this tensor. A ` dim ` value within...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_171_0.txt
# torch.tan ¶ torch. tan ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the tangent of the elements of ` input ` . out i = tan ⁡ ( input i ) \text{out}_{i} = \tan(\text{input}_{i}) out i ​ = tan ( input ...
pytorch_torch_tensor_functions/Pytorch_Documentations_37_13.txt
t grads are supported and treated as zeros Returns True if all differences satisfy allclose condition ## Profiler ¶ Autograd includes a profiler that lets you inspect the cost of different operators inside your model - both on the CPU and GPU. There are two modes implemented at the moment - CPU-only using ...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_9.txt
` ( _value_ ) [ [source] ](_modules/torch/distributions/geometric.html#Geometric.log_prob) ¶ ` logits ` [ [source] ](_modules/torch/distributions/geometric.html#Geometric.logits) ¶ _property_ ` mean ` ¶ ` probs ` [ [source] ](_modules/torch/distributions/geometric.html#Geometric.probs) ¶ `...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_395_0.txt
# torch.take ¶ torch. take ( _ input _ , _ index _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the elements of ` input ` at the given indices. The input tensor is treated as if it were viewed as a 1-D tensor. The result takes the same shape as the indices. ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_452_0.txt
# torch.Tensor.view ¶ Tensor. view ( _ * shape _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the same data as the ` self ` tensor but of a different [ ` shape ` ](torch.Tensor.shape.html#torch.Tensor.shape "torch.Tensor.shape") . The returned tensor shar...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_125_0.txt
# torch.select ¶ torch. select ( _ input _ , _ dim _ , _ index _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Slices the ` input ` tensor along the selected dimension at the given index. This function returns a view of the original tensor with the given dimension removed. Note If ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_467_0.txt
# torch.Tensor.hypot ¶ Tensor. hypot ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_10_0.txt
# torch.narrow_copy ¶ torch. narrow_copy ( _ input _ , _ dim _ , _ start _ , _ length _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Same as [ ` Tensor.narrow() ` ](torch.Tensor.narrow.html#torch.Tensor.narrow "torch.Tensor.narrow") except this returns ...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_17.txt
lls elements of ` self ` tensor with ` value ` where ` mask ` is True. The shape of ` mask ` must be [ broadcastable ](notes/broadcasting.html#broadcasting-semantics) with the shape of the underlying tensor. Parameters * **mask** ( _BoolTensor_ ) – the boolean mask * **value** ( [ _float_ ](https://d...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_454_0.txt
# torch.Tensor.grad ¶ Tensor. grad ¶ This attribute is ` None ` by default and becomes a Tensor the first time a call to [ ` backward() ` ](torch.Tensor.backward.html#torch.Tensor.backward "torch.Tensor.backward") computes gradients for ` self ` . The attribute will then contain the gradients computed a...
pytorch_torch_tensor_functions/Pytorch_Documentations_10_3.txt
new ResNet variant. ![](/assets/images/resnest.jpg) ](/hub/pytorch_vision_resnest/) [ * ResNet * * ![](/assets/images/logo-github.svg) * * Deep residual networks pre-trained on ImageNet ![](/assets/images/resnet.png) ](/hub/pytorch_vision_resnet/) [ * ResNext * * ![](/assets/images/logo-github....
pytorch_torch_tensor_functions/Pytorch_Documentations_55_3.txt
html#lazy-modules-initialization) * [ torch.nn.functional ](nn.functional.html) * [ Convolution functions ](nn.functional.html#convolution-functions) * [ Pooling functions ](nn.functional.html#pooling-functions) * [ Attention Mechanisms ](nn.functional.html#attention-mechanisms) * [ Non-linear activat...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_182_0.txt
# torch.Tensor.sparse_dim ¶ Tensor. sparse_dim ( ) → [ int ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") ¶ Return the number of sparse dimensions in a [ sparse tensor ](../sparse.html#sparse-docs) ` self ` . Note Returns ` 0 ` if ` self ` is not a sparse tensor.
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_345_0.txt
# torch.unbind ¶ torch. unbind ( _ input _ , _ dim = 0 _ ) → seq ¶ Removes a tensor dimension. Returns a tuple of all slices along a given dimension, already without it. Parameters * **input** ( [ _Tensor_ ](../tensors.html#torch.Tensor "torch.Tensor") ) – the tensor to unbind * **di...
pytorch_torch_tensor_functions/Pytorch_Documentations_40_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_340_0.txt
# torch.Tensor.t ¶ Tensor. t ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_161_0.txt
# torch.nanquantile ¶ torch. nanquantile ( _ input _ , _ q _ , _ dim = None _ , _ keepdim = False _ , _ * _ , _ interpolation = 'linear' _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ This is a variant of [ ` torch.quantile() ` ](torch.quantile.html#torch...
pytorch_torch_tensor_functions/Pytorch_Documentations_13_1.txt
d engineering, especially in signal processing. Traditionally many users and libraries (e.g., TorchAudio) have handled complex numbers by representing the data in float tensors with shape ( . . . , 2 ) (..., 2) ( . . . , 2 ) where the last dimension contains the real and imaginary values. Tensors of com...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_11.txt
rameters * **mod** – input module * **mapping** – a dictionary that maps from nn module to nnq module Returns The corresponding quantized module of mod ` torch.quantization. ` ` propagate_qconfig_ ` ( _module_ , _qconfig_dict=None_ , _white_list=None_ ) [ [source] ](_modules/torch/quantization...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_21.txt
ts is smaller, the underlying storage is not changed. Existing elements are preserved but any new memory is uninitialized. Warning This is a low-level method. The storage is reinterpreted as C-contiguous, ignoring the current strides (unless the target size equals the current size, in which case the tensor is left un...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_364_0.txt
# torch.Tensor.reciprocal ¶ Tensor. reciprocal ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_24_9.txt
if ` device ` is ` None ` (default). Warning This function now calls ` reset_peak_memory_stats() ` , which resets /all/ peak memory stats. Note See [ Memory management ](notes/cuda.html#cuda-memory-management) for more details about GPU memory management. ## NVIDIA Tools Extension (NVTX) ¶ ` torch.cuda.nvt...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_397_0.txt
# torch.Tensor.less_equal ¶ Tensor. less_equal ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_205_0.txt
# torch.Tensor.scatter_ ¶ Tensor. scatter_ ( _ dim _ , _ index _ , _ src _ , _ reduce = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Writes all values from the tensor ` src ` into ` self ` at the indices specified in the ` index ` tensor. For each value in ` src ` , it...
pytorch_torch_tensor_functions/Pytorch_Documentations_53_5.txt
g on the left-hand side of an assignment) Note that these cases may in fact be traceable in the future. #### Automatic Trace Checking ¶ One way to automatically catch many errors in traces is by using ` check_inputs ` on the ` torch.jit.trace() ` API. ` check_inputs ` takes a list of tuples of inputs that will...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_46.txt
orch.distributions.independent.Independent method) ](distributions.html#torch.distributions.independent.Independent.sample) * [ (torch.distributions.mixture_same_family.MixtureSameFamily method) ](distributions.html#torch.distributions.mixture_same_family.MixtureSameFamily.sample) * [ (torch.distributions.multi...
pytorch_torch_tensor_functions/Pytorch_Documentations_39_9.txt
at the same position from the right but do not match. # Dimensions aren't aligned when matching tensor.names[-1] and other.names[-1]: # tensor: Tensor[N, None] # other: Tensor[ N] >>> tensor = torch.randn(3, 3, names=('N', None)) >>> other = torch.randn(3, names=('N',)) >>> (tens...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_203_0.txt
# torch.Tensor.index_add_ ¶ Tensor. index_add_ ( _ dim _ , _ index _ , _ source _ , _ * _ , _ alpha = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Accumulate the elements of ` alpha ` times ` source ` into the ` self ` tensor by adding to the indices in the order given in ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_480_1.txt
ac{1}{\min_{i \neq j} \sigma_i^2 - \sigma_j^2} m i n i  = j ​ σ i 2 ​ − σ j 2 ​ 1 ​ . The same happens when the matrix has small singular values, as these gradients also depend on S⁻¹ . Warning For complex-valued ` input ` the singular value decomposition is not unique, as U and V may be mu...
pytorch_torch_tensor_functions/Pytorch_Documentations_27_10.txt
ansform. [ ` bartlett_window ` ](generated/torch.bartlett_window.html#torch.bartlett_window "torch.bartlett_window") | Bartlett window function. [ ` blackman_window ` ](generated/torch.blackman_window.html#torch.blackman_window "torch.blackman_window") | Blackman window function. [ ` hamming_window ` ](ge...
pytorch_torch_tensor_functions/Pytorch_Documentations_31_2.txt
s-versions) ### Quick Start With Cloud Partners Get up and running with PyTorch quickly through popular cloud platforms and machine learning services. Amazon Web Services * [ PyTorch on AWS ](https://aws.amazon.com/pytorch/) * [ Amazon SageMaker ](https://aws.amazon.com/sagemaker) * [ AWS Deep Learning Con...
pytorch_torch_tensor_functions/Pytorch_Documentations_47_23.txt
ummed for each minibatch. Ignored when reduce is ` False ` . Default: ` True ` * **ignore_index** ( [ _int_ ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.8\)") _,_ _optional_ ) – Specifies a target value that is ignored and does not contribute to the input gradient. When ` size_average ` ...
pytorch_torch_tensor_functions/Pytorch_Documentations_44_2.txt
p feedforward neural networks \- Glorot, X. & Bengio, Y. (2010), using a uniform distribution. The resulting tensor will have values sampled from U ( − a , a ) \mathcal{U}(-a, a) U ( − a , a ) where a = gain × 6 fan_in \+ fan_out a = \text{gain} \times \sqrt{\frac{6}{\text{fan\\_in} + \text{fan...
pytorch_torch_tensor_functions/Pytorch_Documentations_61_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_82_0.txt
# torch.Tensor.reshape ¶ Tensor. reshape ( _ * shape _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a tensor with the same data and number of elements as ` self ` but with the specified shape. This method returns a view if [ ` shape ` ](torch.Tensor.shape.html#torch.Tensor.s...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_122_0.txt
# torch.diag_embed ¶ torch. diag_embed ( _ input _ , _ offset = 0 _ , _ dim1 = -2 _ , _ dim2 = -1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Creates a tensor whose diagonals of certain 2D planes (specified by ` dim1 ` and ` dim2 ` ) are filled by ` input ` . To facilit...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_99_0.txt
# torch.Tensor.erfinv ¶ Tensor. erfinv ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_49_18.txt
) ` ](generated/torch.nonzero.html#torch.nonzero "torch.nonzero") ` norm ` ( _p='fro'_ , _dim=None_ , _keepdim=False_ , _dtype=None_ ) [ [source] ](_modules/torch/tensor.html#Tensor.norm) ¶ See [ ` torch.norm() ` ](generated/torch.norm.html#torch.norm "torch.norm") ` normal_ ` ( _mean=0_ , _std=1_ , _*_ ...
pytorch_torch_tensor_functions/Pytorch_Documentations_2_2.txt
std::cerr << "API was used: " << event_name << std::endl; }); Note for developers: new API trigger points can be added in code with ` C10_LOG_API_USAGE_ONCE("my_api") ` in C++ or ` torch._C._log_api_usage_once("my.api") ` in Python. ## Attaching metadata to saved TorchScript models ¶ TorchScript m...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_27_0.txt
# torch.Tensor.trunc ¶ Tensor. trunc ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_57_1.txt
tors for optimization. This package generally follows the design of the [ TensorFlow Distributions ](https://arxiv.org/abs/1711.10604) package. It is not possible to directly backpropagate through random samples. However, there are two main methods for creating surrogate functions that can be backpropagated through. T...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_478_0.txt
# torch.slice_scatter ¶ torch. slice_scatter ( _ input _ , _ src _ , _ dim = 0 _ , _ start = None _ , _ end = None _ , _ step = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Embeds the values of the ` src ` tensor into ` input ` at the given dimension. This function re...
pytorch_torch_tensor_functions/Pytorch_Documentations_55_5.txt
ted_memory ](generated/torch.mps.current_allocated_memory.html) * [ torch.mps.driver_allocated_memory ](generated/torch.mps.driver_allocated_memory.html) * [ MPS Profiler ](mps.html#mps-profiler) * [ MPS Event ](mps.html#mps-event) * [ torch.xpu ](xpu.html) * [ StreamContext ](generated/torch.xpu.Stre...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_98_0.txt
# torch.Tensor.conj_physical ¶ Tensor. conj_physical ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_195_0.txt
# torch.log10 ¶ torch. log10 ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the logarithm to the base 10 of the elements of ` input ` . y i = log ⁡ 10 ( x i ) y_{i} = \log_{10} (x_{i}) y i ​ = lo g 10 ​...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_323_0.txt
# torch.Tensor.cpu ¶ Tensor. cpu ( _ memory_format = torch.preserve_format _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a copy of this object in CPU memory. If this object is already in CPU memory and on the correct device, then no copy is performed and the original object...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_39.txt
te_normal.MultivariateNormal.precision_matrix) * [ predict() (torch.nn.AdaptiveLogSoftmaxWithLoss method) ](generated/torch.nn.AdaptiveLogSoftmaxWithLoss.html#torch.nn.AdaptiveLogSoftmaxWithLoss.predict) * [ PReLU (class in torch.nn) ](generated/torch.nn.PReLU.html#torch.nn.PReLU) * [ prelu() (in module torch.nn....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_308_0.txt
# torch.bincount ¶ torch. bincount ( _ input _ , _ weights = None _ , _ minlength = 0 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Count the frequency of each value in an array of non-negative ints. The number of bins (size 1) is one larger than the largest value in ` input ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_28_0.txt
# torch.Tensor.polygamma ¶ Tensor. polygamma ( _ n _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_379_0.txt
# torch.quantile ¶ torch. quantile ( _ input _ , _ q _ , _ dim = None _ , _ keepdim = False _ , _ * _ , _ interpolation = 'linear' _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the q-th quantiles of each row of the ` input ` tensor along the dim...
pytorch_torch_tensor_functions/Pytorch_Documentations_62_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_52_8.txt
.utils.vector_to_parameters.html#torch.nn.utils.vector_to_parameters "torch.nn.utils.vector_to_parameters") | Convert one vector to the parameters [ ` prune.BasePruningMethod ` ](generated/torch.nn.utils.prune.BasePruningMethod.html#torch.nn.utils.prune.BasePruningMethod "torch.nn.utils.prune.BasePruningMethod") |...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_291_0.txt
# torch.isfinite ¶ torch. isfinite ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with boolean elements representing if each element is finite or not. Real values are finite when they are not NaN, negative infinity, or infinity. Complex values are fini...
pytorch_torch_tensor_functions/Pytorch_Documentations_46_7.txt
([ [255, 0, 0], [0, 255, 0], [0, 0, 255], [255, 0, 255], ], dtype=torch.int).unsqueeze(0) faces_tensor = torch.as_tensor([ [0, 2, 3], [0, 3, 1], [0, 1, 2], [1, 3, 2], ], dtype=torch.int).unsqueeze(0) writer = SummaryWriter() writer...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_279_0.txt
# torch.diagflat ¶ torch. diagflat ( _ input _ , _ offset = 0 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ * If ` input ` is a vector (1-D tensor), then returns a 2-D square tensor with the elements of ` input ` as the diagonal. * If ` input ` is a tensor with more than o...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_223_0.txt
# torch.bitwise_xor ¶ torch. bitwise_xor ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the bitwise XOR of ` input ` and ` other ` . The input tensor must be of integral or Boolean types. For bool tensors, it computes the l...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_444_0.txt
# torch.Tensor.absolute ¶ Tensor. absolute ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` abs() ` ](torch.abs.html#torch.abs "torch.abs")
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_394_0.txt
# torch.Tensor.contiguous ¶ Tensor. contiguous ( _ memory_format = torch.contiguous_format _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a contiguous in memory tensor containing the same data as ` self ` tensor. If ` self ` tensor is already in the specified memory format...
pytorch_torch_tensor_functions/Pytorch_Documentations_62_10.txt
n a separate GPU device of the host where the function is called. Note that the length of the tensor list needs to be identical among all the distributed processes. Also note that currently the multi-GPU collective functions are only supported by the NCCL backend. For example, if the system we use for distributed trai...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_497_0.txt
# torch.Tensor.bitwise_and ¶ Tensor. bitwise_and ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_26_1.txt
hat each dlpack can only be consumed once. ` torch.utils.dlpack. ` ` to_dlpack ` ( _tensor_ ) → PyCapsule ¶ Returns a DLPack representing the tensor. Parameters **tensor** – a tensor to be exported The dlpack shares the tensors memory. Note that each dlpack can only be consumed once. [ Next ![](_st...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_232_0.txt
# torch.matrix_exp ¶ torch. matrix_exp ( _ A _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.linalg.matrix_exp() ` ](torch.linalg.matrix_exp.html#torch.linalg.matrix_exp "torch.linalg.matrix_exp") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_326_0.txt
# torch.Tensor.repeat ¶ Tensor. repeat ( _ * sizes _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Repeats this tensor along the specified dimensions. Unlike [ ` expand() ` ](torch.Tensor.expand.html#torch.Tensor.expand "torch.Tensor.expand") , this function copies the tensor’s data....
pytorch_torch_tensor_functions/Pytorch_Documentations_7_29.txt
, 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: [ Cookies Policy ](https://www.facebook.com/policies/cookies/) . ![](_static/images/pytorch-x....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_228_0.txt
# torch.index_select ¶ torch. index_select ( _ input _ , _ dim _ , _ index _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor which indexes the ` input ` tensor along dimension ` dim ` using the entries in ` index ` which is a LongTens...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_70_0.txt
# torch.eq ¶ torch. eq ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes element-wise equality The second argument can be a number or a tensor whose shape is [ broadcastable ](../notes/broadcasting.html#broadcasting-semantics)...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_29.txt
ut ` . Parameters * **dim** ( [ _int_ ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.8\)") ) – the dimension to reduce * **keepdim** ( [ _bool_ ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.8\)") ) – whether the output tensor has ` dim ` retained or not ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_114_0.txt
# torch.greater_equal ¶ torch. greater_equal ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.ge() ` ](torch.ge.html#torch.ge "torch.ge") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_9_0.txt
# torch.Tensor.index_put_ ¶ Tensor. index_put_ ( _ indices _ , _ values _ , _ accumulate = False _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Puts values from the tensor [ ` values ` ](torch.Tensor.values.html#torch.Tensor.values "torch.Tensor.values") into the tensor ` self `...
pytorch_torch_tensor_functions/Pytorch_Documentations_48_7.txt
e is used to export all operators as ATen ops, and avoid conversion to ONNX. Example torch ir graph: graph(%0 : Float(2:12, 3:4, 4:1)): %3 : Float(2:12, 3:4, 4:1) = aten::exp(%0) %4 : Float(2:12, 3:4, 4:1) = aten::div(%0, %3) return (%4) Is exported as: ...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_21.txt
es have not been registered via ` register_kl() ` . ` torch.distributions.kl. ` ` register_kl ` ( _type_p_ , _type_q_ ) [ [source] ](_modules/torch/distributions/kl.html#register_kl) ¶ Decorator to register a pairwise function with ` kl_divergence() ` . Usage: @register_kl(Normal, Normal) ...
pytorch_torch_tensor_functions/Pytorch_Documentations_11_3.txt
ytorch.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/pytorch) To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_378_0.txt
# torch.Tensor.nbytes ¶ Tensor. nbytes ¶ Returns the number of bytes consumed by the “view” of elements of the Tensor if the Tensor does not use sparse storage layout. Defined to be [ ` numel() ` ](torch.Tensor.numel.html#torch.Tensor.numel "torch.Tensor.numel") * [ ` element_size() ` ](torch.Tensor.elem...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_338_0.txt
# torch.Tensor.logical_or ¶ Tensor. logical_or ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_58_50.txt
n.Flatten.state_dict) * [ (torch.nn.Module method) ](generated/torch.nn.Module.html#torch.nn.Module.state_dict) * [ (torch.optim.lr_scheduler.LambdaLR method) ](optim.html#torch.optim.lr_scheduler.LambdaLR.state_dict) * [ (torch.optim.lr_scheduler.MultiplicativeLR method) ](optim.html#torch.optim.lr_schedul...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_30_0.txt
# torch.Tensor.expand ¶ Tensor. expand ( _ * sizes _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new view of the ` self ` tensor with singleton dimensions expanded to a larger size. Passing -1 as the size for a dimension means not changing the size of that dimension. Ten...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_18_0.txt
# torch.Tensor.q_scale ¶ Tensor. q_scale ( ) → [ float ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.12\)") ¶ Given a Tensor quantized by linear(affine) quantization, returns the scale of the underlying quantizer().
pytorch_torch_tensor_functions/Pytorch_Documentations_52_5.txt
Norm") | Applies local response normalization over an input signal composed of several input planes, where channels occupy the second dimension. ## Recurrent Layers ¶ [ ` nn.RNNBase ` ](generated/torch.nn.RNNBase.html#torch.nn.RNNBase "torch.nn.RNNBase") | ---|--- [ ` nn.RNN ` ](generated/torch.nn.RNN....
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_473_0.txt
# torch.Tensor.softmax ¶ Tensor. softmax ( _ dim _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.nn.functional.softmax() ` ](torch.nn.functional.softmax.html#torch.nn.functional.softmax "torch.nn.functional.softmax") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_290_0.txt
# torch.Tensor.abs ¶ Tensor. abs ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_63_2.txt
(bool_tensor + long_tensor).dtype torch.int64 >>> (bool_tensor + uint_tensor).dtype torch.uint8 >>> (float_tensor + double_tensor).dtype torch.float64 >>> (complex_float_tensor + complex_double_tensor).dtype torch.complex128 >>> (bool_tensor + int_tensor).dtype torch.int32 # Sinc...
pytorch_torch_tensor_functions/Pytorch_Documentations_12_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_294_0.txt
# torch.Tensor.share_memory_ ¶ Tensor. share_memory_ ( ) [ [source] ](../_modules/torch/_tensor.html#Tensor.share_memory_) ¶ Moves the underlying storage to shared memory. This is a no-op if the underlying storage is already in shared memory and for CUDA tensors. Tensors in shared memory cannot be resiz...
pytorch_torch_tensor_functions/Pytorch_Documentations_49_5.txt
l() ` ](generated/torch.real.html#torch.real "torch.real") is only supported for tensors with complex dtypes. Example:: >>> x=torch.randn(4, dtype=torch.cfloat) >>> x tensor([(0.3100+0.3553j), (-0.5445-0.7896j), (-1.6492-0.0633j), (-0.0638-0.8119j)]) >>> x.real tensor([ 0.3100, -0....