id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_479_0.txt
# torch.Tensor.lgamma ¶ Tensor. lgamma ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_309_0.txt
# torch.Tensor.multiply ¶ Tensor. multiply ( _ value _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_37_3.txt
le of Tensors. If both of them are tuples, then the Jacobian will be a tuple of tuple of Tensors where ` Jacobian[i][j] ` will contain the Jacobian of the ` i ` th output and ` j ` th input and will have as size the concatenation of the sizes of the corresponding output and the corresponding input. Return type ...
pytorch_torch_tensor_functions/Pytorch_Documentations_42_3.txt
his. 1\. Don’t use ` multiprocessing ` . Set the ` num_worker ` of [ ` DataLoader ` ](../data.html#torch.utils.data.DataLoader "torch.utils.data.DataLoader") to zero. 2\. Share CPU tensors instead. Make sure your custom ` DataSet ` returns CPU tensors. [ Next ![](../_static/images/chevron-right-orange.svg) ](../c...
pytorch_torch_tensor_functions/Pytorch_Documentations_10_4.txt
opyright The Linux Foundation. The PyTorch Foundation is a project of The Linux Foundation. For web site terms of use, trademark policy and other policies applicable to The PyTorch Foundation please see [ www.linuxfoundation.org/legal/policies/ ](https://www.linuxfoundation.org/legal/policies/) . The PyTorch Foundation...
pytorch_torch_tensor_functions/Pytorch_Documentations_53_7.txt
pported type can be added as mutable > attributes. Most types can be inferred but some may need to be specified, > see module attributes for details. Q: I would like to trace module’s method but I keep getting this error: ` RuntimeError: Cannot insert a Tensor that requires grad as a constant. Consider ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_307_0.txt
# torch.bitwise_left_shift ¶ torch. bitwise_left_shift ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the left arithmetic shift of ` input ` by ` other ` bits. The input tensor must be of integral type. This operator suppor...
pytorch_torch_tensor_functions/Pytorch_Documentations_3_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_44_0.txt
# torch.flatten ¶ torch. flatten ( _ input _ , _ start_dim = 0 _ , _ end_dim = -1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Flattens ` input ` by reshaping it into a one-dimensional tensor. If ` start_dim ` or ` end_dim ` are passed, only dimensions starting with ` start_...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_53.txt
ink) * [ TanhTransform (class in torch.distributions.transforms) ](distributions.html#torch.distributions.transforms.TanhTransform) * [ temperature() (torch.distributions.relaxed_bernoulli.RelaxedBernoulli property) ](distributions.html#torch.distributions.relaxed_bernoulli.RelaxedBernoulli.temperature) * [ (to...
pytorch_torch_tensor_functions/Pytorch_Documentations_11_1.txt
s driving the overall project direction with a strong bias towards PyTorch’s design philosophy where design and code contributions are valued. Beyond the core maintainers, there is also a slightly broader set of core developers that have the ability to directly merge pull requests and own various parts of the core code...
pytorch_torch_tensor_functions/Visualizing_PyTorch_memory_2_0.txt
## Saving snapshots Since the traces are just part of the snapshot, they can be pickled in the same way to view offline later. from pickle import dump with open('snapshot.pickle', 'wb') as f: dump(snapshot, f) The file [ _memory_viz.py ](https://github.com/pytorch/pytorch/blob/master/...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_328_0.txt
# torch.Tensor.ge ¶ Tensor. ge ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_399_0.txt
# torch.Tensor.copysign ¶ Tensor. copysign ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_13_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_58_8.txt
cuda.comm) ](cuda.html#torch.cuda.comm.broadcast) * [ (in module torch.distributed) ](distributed.html#torch.distributed.broadcast) * [ broadcast_coalesced() (in module torch.cuda.comm) ](cuda.html#torch.cuda.comm.broadcast_coalesced) * [ broadcast_multigpu() (in module torch.distributed) ](distributed.html#tor...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_13.txt
minimum and maximum of incoming tensors, and uses this statistic to compute the quantization parameters. Parameters * **ch_axis** – Channel axis * **dtype** – Quantized data type * **qscheme** – Quantization scheme to be used * **reduce_range** – Reduces the range of the quantized data type by 1 b...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_471_0.txt
# torch.Tensor.sinh ¶ Tensor. sinh ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_39_3.txt
ensor.div() ` ](tensors.html#torch.Tensor.div "torch.Tensor.div") , [ ` torch.div() ` ](generated/torch.div.html#torch.div "torch.div") | Unifies names from inputs [ ` Tensor.div_() ` ](tensors.html#torch.Tensor.div_ "torch.Tensor.div_") | Unifies names from inputs [ ` Tensor.dot() ` ](tensors.html#torch.Te...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_107_0.txt
# torch.Tensor.chalf ¶ Tensor. chalf ( _ memory_format = torch.preserve_format _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_55_4.txt
can_device_access_peer ](generated/torch.cuda.can_device_access_peer.html) * [ torch.cuda.current_blas_handle ](generated/torch.cuda.current_blas_handle.html) * [ torch.cuda.current_device ](generated/torch.cuda.current_device.html) * [ torch.cuda.current_stream ](generated/torch.cuda.current_stream.html) ...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_25.txt
e * **~Conv3d.zero_point** ( [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – scalar for the output zero point See [ ` Conv3d ` ](generated/torch.nn.Conv3d.html#torch.nn.Conv3d "torch.nn.Conv3d") for other attributes. Examples: >>> # With square kernels and equal stride >>> m = nn.q...
pytorch_torch_tensor_functions/Pytorch_Documentations_8_1.txt
kI0MUMxMUUyQUQzREIxQzRENUFFNUM5NiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkUxNkJENjdGQjNGMDExRTJBRDNEQjFDNEQ1QUU1Qzk2IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkUxNkJENjgwQjNGMDExRTJBRDNEQjFDNEQ1QUU1Qzk2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+hfPRaQAAB6lJR...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_311_0.txt
# torch.Tensor.sub ¶ Tensor. sub ( _ other _ , _ * _ , _ alpha = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_57_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_47_16.txt
If ` input ` is 2D of shape (B, N) , > > it will be treated as ` B ` bags (sequences) each of fixed length ` N ` , > and this will return ` B ` values aggregated in a way depending on the ` > mode ` . ` offsets ` is ignored and required to be ` None ` in this case. > > * If ` input ` is 1D of shape (N) ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_276_0.txt
# torch.Tensor.true_divide_ ¶ Tensor. true_divide_ ( _ value _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ In-place version of ` true_divide_() `
pytorch_torch_tensor_functions/Pytorch_Documentations_57_4.txt
distributions.exp_family.ExponentialFamily ` Beta distribution parameterized by ` concentration1 ` and ` concentration0 ` . Example: >>> m = Beta(torch.tensor([0.5]), torch.tensor([0.5])) >>> m.sample() # Beta distributed with concentration concentration1 and concentration0 tensor([ 0.1046...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_481_0.txt
# torch.Tensor.ceil ¶ Tensor. ceil ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_74_0.txt
# torch.Tensor.acos ¶ Tensor. acos ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_406_0.txt
# torch.arcsin ¶ torch. arcsin ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.asin() ` ](torch.asin.html#torch.asin "torch.asin") .
pytorch_torch_tensor_functions/Pytorch_Documentations_47_12.txt
n.InstanceNorm3d.html#torch.nn.InstanceNorm3d "torch.nn.InstanceNorm3d") for details. ### layer_norm ¶ ` torch.nn.functional. ` ` layer_norm ` ( _input_ , _normalized_shape_ , _weight=None_ , _bias=None_ , _eps=1e-05_ ) [ [source] ](_modules/torch/nn/functional.html#layer_norm) ¶ Applies Layer Normalizatio...
pytorch_torch_tensor_functions/Pytorch_Documentations_67_4.txt
using a [ theme ](https://github.com/rtfd/sphinx_rtd_theme) provided by [ Read the Docs ](https://readthedocs.org) . * torch.hub * Publishing models * How to implement an entrypoint? * Important Notice * Loading models from Hub * Running a loaded model: * Where are my downloade...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_62_0.txt
# torch.mm ¶ torch. mm ( _ input _ , _ mat2 _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Performs a matrix multiplication of the matrices ` input ` and ` mat2 ` . If ` input ` is a ( n × m ) (n \times m) ( n × m ) tensor, ` mat2 ` is a ...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_1.txt
the operations on tensors with integers rather than floating point values. This allows for a more compact model representation and the use of high performance vectorized operations on many hardware platforms. PyTorch supports INT8 quantization compared to typical FP32 models allowing for a 4x reduction in the model siz...
pytorch_torch_tensor_functions/Pytorch_Documentations_62_11.txt
orted tensors should only be GPU tensors Parameters * **list** ( _tensor_ ) – List of input and output tensors of the collective. The function operates in-place and requires that each tensor to be a GPU tensor on different GPUs. You also need to make sure that ` len(tensor_list) ` is the same for all the dis...
pytorch_torch_tensor_functions/Pytorch_Documentations_59_9.txt
rch/utils/data/sampler.html#SubsetRandomSampler) ¶ Samples elements randomly from a given list of indices, without replacement. Parameters * **indices** ( _sequence_ ) – a sequence of indices * **generator** ( [ _Generator_ ](generated/torch.Generator.html#torch.Generator "torch.Generator") ) – Gen...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_351_0.txt
# torch.Tensor.uniform_ ¶ Tensor. uniform_ ( _ from=0 _ , _ to=1 _ , _ * _ , _ generator=None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Fills ` self ` tensor with numbers sampled from the continuous uniform distribution: f ( x ) = 1 to − from f(x) = \dfrac{1}{\text{t...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_298_0.txt
# torch.Tensor.as_subclass ¶ Tensor. as_subclass ( _ cls _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Makes a ` cls ` instance with the same data pointer as ` self ` . Changes in the output mirror changes in ` self ` , and the output stays attached to the autograd graph. ` cls ` ...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_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_60_14.txt
[ ![](_static/images/chevron-right-orange.svg) Previous ](quantization.html "Quantization") * * * © Copyright 2019, Torch Contributors. Built with [ Sphinx ](http://sphinx-doc.org/) using a [ theme ](https://github.com/rtfd/sphinx_rtd_theme) provided by [ Read the Docs ](https://readthedocs.org) . * Distributed ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_173_0.txt
# torch.Tensor.detach ¶ Tensor. detach ( ) ¶ Returns a new Tensor, detached from the current graph. The result will never require gradient. This method also affects forward mode AD gradients and the result will never have forward mode AD gradients. Note Returned Tensor shares the same storage with th...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_24.txt
` greater_than ` ¶ alias of ` torch.distributions.constraints._GreaterThan ` ` torch.distributions.constraints. ` ` greater_than_eq ` ¶ alias of ` torch.distributions.constraints._GreaterThanEq ` ` torch.distributions.constraints. ` ` less_than ` ¶ alias of ` torch.distributions.constraints._Le...
pytorch_torch_tensor_functions/Pytorch_Documentations_53_9.txt
best suited for simple record-like types (think a ` NamedTuple ` with methods attached). Everything in a user defined [ TorchScript Class ](torchscript-class) is exported by default, functions can be decorated with [ ` @torch.jit.ignore ` ](generated/torch.jit.ignore.html#torch.jit.ignore "torch.jit.ignore") if need...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_4.txt
eLU * ` ConvBnReLU2d ` — Conv2d + BatchNorm + ReLU * ` ConvReLU1d ` — Conv1d + ReLU * ` ConvReLU2d ` — Conv2d + ReLU * ` ConvReLU3d ` — Conv3d + ReLU * ` LinearReLU ` — Linear + ReLU * ` torch.nn.intrinsic.qat ` — versions of layers for quantization-aware training: * ` ConvBn2d ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_466_0.txt
# torch.Tensor.atan ¶ Tensor. atan ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_289_0.txt
# torch.Tensor.char ¶ Tensor. char ( _ memory_format = torch.preserve_format _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_47_15.txt
3618], [ 0.4161, 0.2419, 0.7383]], [[ 0.6246, 0.9751, 0.3618], [ 0.0237, 0.7794, 0.0528], [ 0.9666, 0.7761, 0.6108], [ 0.3385, 0.8612, 0.1867]]]) >>> # example with padding_idx >>> weights = torch.rand(10, 3) >>> weights[0, ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_524_0.txt
# torch.Tensor.dim ¶ Tensor. dim ( ) → [ int ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") ¶ Returns the number of dimensions of ` self ` tensor.
pytorch_torch_tensor_functions/Pytorch_Documentations_53_2.txt
t.load "torch.jit.load") (f[, map_location, _extra_files]) | Load a [ ` ScriptModule ` ](generated/torch.jit.ScriptModule.html#torch.jit.ScriptModule "torch.jit.ScriptModule") or [ ` ScriptFunction ` ](generated/torch.jit.ScriptFunction.html#torch.jit.ScriptFunction "torch.jit.ScriptFunction") previously saved with...
pytorch_torch_tensor_functions/Pytorch_Documentations_50_1.txt
ipt C++ API ¶ [ TorchScript ](https://pytorch.org/docs/stable/jit.html) allows PyTorch models defined in Python to be serialized and then loaded and run in C++ capturing the model code via compilation or tracing its execution. You can learn more in the [ Loading a TorchScript Model in C++ tutorial ](https://pytorch.o...
pytorch_torch_tensor_functions/Pytorch_Documentations_10_1.txt
eeplearningexamples_gpunet/) [ * HiFi GAN * * ![](/assets/images/logo-github.svg) * * The HiFi GAN model for generating waveforms from mel spectrograms ![](/assets/images/nvidia_logo.png) ](/hub/nvidia_deeplearningexamples_hifigan/) [ * Once-for-All * * ![](/assets/images/logo-github.svg) * *...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_208_0.txt
# torch.var ¶ torch. var ( _ input _ , _ dim = None _ , _ * _ , _ correction = 1 _ , _ keepdim = False _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Calculates the variance over the dimensions specified by ` dim ` . ` dim ` can be a single dimension, lis...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_362_0.txt
# torch.asinh ¶ torch. asinh ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a new tensor with the inverse hyperbolic sine of the elements of ` input ` . out i = sinh ⁡ − 1 ( input i ) \text{out}_{i} = \sinh^{-1}(\text{input}_{...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_8.txt
[ _float_ ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.8\)") _or_ [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – degrees of freedom parameter 2 ` arg_constraints ` _= {'df1': GreaterThan(lower_bound=0.0), 'df2': GreaterThan(lower_bound=0.0)}_ ¶ ` expand ` ( _batch_shape...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_31.txt
butions.negative_binomial.NegativeBinomial attribute) ](distributions.html#torch.distributions.negative_binomial.NegativeBinomial.logits) * [ (torch.distributions.relaxed_bernoulli.LogitRelaxedBernoulli attribute) ](distributions.html#torch.distributions.relaxed_bernoulli.LogitRelaxedBernoulli.logits) * [ logits(...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_462_0.txt
# torch.Tensor.dequantize ¶ Tensor. dequantize ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Given a quantized Tensor, dequantize it and return the dequantized float Tensor.
pytorch_torch_tensor_functions/Pytorch_Documentations_28_1.txt
n PyTorch, small mistakes can rapidly cause your program to use up all of your GPU; fortunately, the fixes in these cases are often simple. Here are a few common things to check: **Don’t accumulate history across your training loop.** By default, computations involving variables that require gradients will keep histor...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_14.txt
* ` fake_quant_enable ` controls the application of fake quantization on tensors, note that statistics can still be updated. * ` observer_enable ` controls statistics collection on tensors * ` dtype ` specifies the quantized dtype that is being emulated with fake-quantization, allowable values are ...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_11.txt
r([1.0])) >>> m.sample() # Laplace distributed with loc=0, scale=1 tensor([ 0.1046]) Parameters * **loc** ( [ _float_ ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.8\)") _or_ [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – mean of the distribution * **sc...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_32_0.txt
# torch.Tensor.logical_and ¶ Tensor. logical_and ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_293_0.txt
# torch.Tensor.addmv ¶ Tensor. addmv ( _ mat _ , _ vec _ , _ * _ , _ beta = 1 _ , _ alpha = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_446_0.txt
# torch.Tensor.normal_ ¶ Tensor. normal_ ( _ mean = 0 _ , _ std = 1 _ , _ * _ , _ generator = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Fills ` self ` tensor with elements samples from the normal distribution parameterized by [ ` mean ` ](torch.mean.html#torch.mean...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_15.txt
q(lower_bound=0)}_ ¶ ` expand ` ( _batch_shape_ , __instance=None_ ) [ [source] ](_modules/torch/distributions/negative_binomial.html#NegativeBinomial.expand) ¶ ` log_prob ` ( _value_ ) [ [source] ](_modules/torch/distributions/negative_binomial.html#NegativeBinomial.log_prob) ¶ ` logits ` [ [s...
pytorch_torch_tensor_functions/Pytorch_Documentations_52_3.txt
ml#torch.nn.ConstantPad3d "torch.nn.ConstantPad3d") | Pads the input tensor boundaries with a constant value. ## Non-linear Activations (weighted sum, nonlinearity) ¶ [ ` nn.ELU ` ](generated/torch.nn.ELU.html#torch.nn.ELU "torch.nn.ELU") | Applies the element-wise function: ---|--- [ ` nn.Hardshrink ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_158_0.txt
# torch.Tensor.logit ¶ Tensor. logit ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_47_8.txt
⁡ ( 0 , x ) \+ min ⁡ ( 0 , α ∗ ( exp ⁡ ( x ) − 1 ) ) \text{ELU}(x) = \max(0,x) + \min(0, \alpha * (\exp(x) - 1)) ELU ( x ) = max ( 0 , x ) \+ min ( 0 , α ∗ ( exp ( x ) − 1 ) ) . See [ ` ELU ` ](generated/torch.nn.ELU.html#torch.nn.ELU "torch.nn.ELU") for more details...
pytorch_torch_tensor_functions/Visualizing_PyTorch_memory_6_0.txt
## Zach's Blog * Zach's Blog * [ ](mailto:) * [ zdevito ](https://github.com/zdevito) * [ Zachary_DeVito ](https://www.twitter.com/Zachary_DeVito) Technical guides for various topics related to machine learning and CUDA programming.
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_453_0.txt
# torch.Tensor.bool ¶ Tensor. bool ( _ memory_format = torch.preserve_format _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_57_2.txt
uated at value . Parameters **value** ( [ _Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") ) – ` entropy ` ( ) [ [source] ](_modules/torch/distributions/distribution.html#Distribution.entropy) ¶ Returns entropy of distribution, batched over batch_shape. Returns Tensor of shape batch_shap...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_415_0.txt
# torch.nanmedian ¶ torch. nanmedian ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns the median of the values in ` input ` , ignoring ` NaN ` values. This function is identical to [ ` torch.median() ` ](torch.median.html#torch.median "torch.median") when there are ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_3_0.txt
# torch.copysign ¶ torch. copysign ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Create a new floating-point tensor with the magnitude of ` input ` and the sign of ` other ` , elementwise. out i = { − ∣ input i ∣ if othe...
pytorch_torch_tensor_functions/Pytorch_Documentations_37_6.txt
, grad_fn=<SumBackward0>), tensor([[1.0689, 1.2431], [3.0989, 4.4456]], grad_fn=<MulBackward0>)) >>> def pow_adder_reducer(x, y): ... return (2 * x.pow(2) + 3 * y.pow(2)).sum() >>> inputs = (torch.rand(2), torch.rand(2)) >>> v = (torch.zeros(2), torch.ones(2)) >>> vhp(pow_adder_r...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_41_0.txt
# torch.vdot ¶ torch. vdot ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the dot product of two 1D vectors along a dimension. In symbols, this function computes ∑ i = 1 n x i ‾ y i . \sum_{i=1}^n \overline{x_i}...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_38.txt
rnoulli.LogitRelaxedBernoulli.param_shape) * [ Parameter (class in torch.nn.parameter) ](generated/torch.nn.parameter.Parameter.html#torch.nn.parameter.Parameter) * [ ParameterDict (class in torch.nn) ](generated/torch.nn.ParameterDict.html#torch.nn.ParameterDict) * [ ParameterList (class in torch.nn) ](generated...
pytorch_torch_tensor_functions/Pytorch_Documentations_46_6.txt
* ( [ _int_ ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.8\)") ) – Number of thresholds used to draw the curve. * **walltime** ( [ _float_ ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.8\)") ) – Optional override default walltime (time.time()) seconds after epoch...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_485_0.txt
# torch.diagonal_scatter ¶ torch. diagonal_scatter ( _ input _ , _ src _ , _ offset = 0 _ , _ dim1 = 0 _ , _ dim2 = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Embeds the values of the ` src ` tensor into ` input ` along the diagonal elements of ` input ` , with resp...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_181_0.txt
# torch.Tensor.to_sparse ¶ Tensor. to_sparse ( _ sparseDims _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a sparse copy of the tensor. PyTorch supports sparse tensors in [ coordinate format ](../sparse.html#sparse-coo-docs) . Parameters **sparseDims** ( [ _int_ ](http...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_240_0.txt
# torch.as_tensor ¶ torch. as_tensor ( _ data _ , _ dtype = None _ , _ device = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Converts ` data ` into a tensor, sharing data and preserving autograd history if possible. If ` data ` is already a tensor with the requested dty...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_312_0.txt
# torch.renorm ¶ torch. renorm ( _ input _ , _ p _ , _ dim _ , _ maxnorm _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns a tensor where each sub-tensor of ` input ` along dimension ` dim ` is normalized such that the p -norm of the sub-tensor...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_90_0.txt
# torch.Tensor.type_as ¶ Tensor. type_as ( _ tensor _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Returns this tensor cast to the type of the given tensor. This is a no-op if the tensor is already of the correct type. This is equivalent to ` self.type(tensor.type()) ` Parameters ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_422_0.txt
# torch.Tensor.addcmul ¶ Tensor. addcmul ( _ tensor1 _ , _ tensor2 _ , _ * _ , _ value = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_202_0.txt
# torch.Tensor.logical_not ¶ Tensor. logical_not ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_49_24.txt
ts indices Example: >>> nnz = 5 >>> dims = [5, 5, 2, 2] >>> I = torch.cat([torch.randint(0, dims[0], size=(nnz,)), torch.randint(0, dims[1], size=(nnz,))], 0).reshape(2, nnz) >>> V = torch.randn(nnz, dims[2], dims[3]) >>> size = torch.Size(dims) >>> S = torch....
pytorch_torch_tensor_functions/Pytorch_Documentations_56_1.txt
ions. For example, to get a view of an existing tensor ` t ` , you can call ` t.view(...) ` . >>> t = torch.rand(4, 4) >>> b = t.view(2, 8) >>> t.storage().data_ptr() == b.storage().data_ptr() # `t` and `b` share the same underlying data. True # Modifying view tensor changes base tens...
pytorch_torch_tensor_functions/Pytorch_Documentations_58_1.txt
nsforms.Normalize.__call__) * [ (torchvision.transforms.ToPILImage method) ](torchvision/transforms.html#torchvision.transforms.ToPILImage.__call__) * [ (torchvision.transforms.ToTensor method) ](torchvision/transforms.html#torchvision.transforms.ToTensor.__call__) * [ __getitem__() (torchvision.datasets.CIFA...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_152_0.txt
# torch.Tensor.addbmm ¶ Tensor. addbmm ( _ batch1 _ , _ batch2 _ , _ * _ , _ beta = 1 _ , _ alpha = 1 _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/Pytorch_Documentations_58_42.txt
ributed.reduce_scatter) * [ reduce_scatter_multigpu() (in module torch.distributed) ](distributed.html#torch.distributed.reduce_scatter_multigpu) * [ ReduceLROnPlateau (class in torch.optim.lr_scheduler) ](optim.html#torch.optim.lr_scheduler.ReduceLROnPlateau) * [ ReduceOp (class in torch.distributed) ](distribut...
pytorch_torch_tensor_functions/Pytorch_Documentations_60_1.txt
ning APIs in the RPC package are stable. There are multiple ongoing work items to improve performance and error handling, which will ship in future releases. Note Please refer to [ PyTorch Distributed Overview ](https://pytorch.org/tutorials/beginner/dist_overview.html) for a brief introduction to all features relat...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_329_0.txt
# torch.Tensor.exponential_ ¶ Tensor. exponential_ ( _ lambd = 1 _ , _ * _ , _ generator = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Fills ` self ` tensor with elements drawn from the PDF (probability density function): f ( x ) = λ e − λ x , x > 0 f(x) =...
pytorch_torch_tensor_functions/Pytorch_Documentations_57_6.txt
g_prob ` ( _value_ ) [ [source] ](_modules/torch/distributions/cauchy.html#Cauchy.log_prob) ¶ _property_ ` mean ` ¶ ` rsample ` ( _sample_shape=torch.Size([])_ ) [ [source] ](_modules/torch/distributions/cauchy.html#Cauchy.rsample) ¶ ` support ` _= Real()_ ¶ _property_ ` variance ` ¶ ...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_14_0.txt
# torch.dot ¶ torch. dot ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Computes the dot product of two 1D tensors. Note Unlike NumPy’s dot, torch.dot intentionally only supports computing the dot product of two 1D tensors with the...
pytorch_torch_tensor_functions/Pytorch_Documentations_7_21.txt
hon v3.8\)") _,_ [ _int_ ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.8\)") _]_ ) – output spatial size. * **scale_factor** ( [ _float_ ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.8\)") _or_ _Tuple_ _[_ [ _float_ ](https://docs.python.org/3/library/functions.ht...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_270_0.txt
# torch.Tensor.arctan2_ ¶ Tensor. arctan2_ ( ) ¶ atan2_(other) -> Tensor In-place version of [ ` arctan2() ` ](torch.Tensor.arctan2.html#torch.Tensor.arctan2 "torch.Tensor.arctan2")
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_151_0.txt
# torch.fix ¶ torch. fix ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.trunc() ` ](torch.trunc.html#torch.trunc "torch.trunc")
pytorch_torch_tensor_functions/Pytorch_Documentations_43_2.txt
h a model in various segments and checkpoint each segment. All segments except the last will run in [ ` torch.no_grad() ` ](generated/torch.no_grad.html#torch.no_grad "torch.no_grad") manner, i.e., not storing the intermediate activations. The inputs of each checkpointed segment will be saved for re-running the segmen...
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_19_0.txt
# torch.xlogy ¶ torch. xlogy ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶ Alias for [ ` torch.special.xlogy() ` ](../special.html#torch.special.xlogy "torch.special.xlogy") .
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_286_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_torch_tensor_functions_271_0.txt
# torch.Tensor.arcsinh ¶ Tensor. arcsinh ( ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_12_0.txt
# torch.Tensor.bfloat16 ¶ Tensor. bfloat16 ( _ memory_format = torch.preserve_format _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶