id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_188_0.txt |
# torch.Tensor.eq ¶
Tensor. eq ( _ other _ ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_5_1.txt | parameters: a torch.jit.ScriptModule object, a blacklisting
optimization set and a preserved method list
By default, if optimization blacklist is None or empty, ` optimize_for_mobile
` will run the following optimizations:
* **Conv2D + BatchNorm fusion** (blacklisting option MobileOptimizerType::CONV_BN_FUSI... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_37_1.txt | to declare ` Tensor ` s for
which gradients should be computed with the ` requires_grad=True ` keyword.
As of now, we only support autograd for floating point ` Tensor ` types (
half, float, double and bfloat16) and complex ` Tensor ` types (cfloat,
cdouble).
` torch.autograd. ` ` backward ` ( _tensors: Union[to... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_385_0.txt |
# torch.Tensor.is_pinned ¶
Tensor. is_pinned ( ) ¶
Returns true if this tensor resides in pinned memory.
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_49_11.txt | ` ](generated/torch.expm1.html#torch.expm1
"torch.expm1")
` expm1_ ` ( ) → Tensor ¶
In-place version of ` expm1() `
` expand ` ( _*sizes_ ) → 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 no... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_147_0.txt |
# torch.Tensor.cumprod ¶
Tensor. cumprod ( _ dim _ , _ dtype = None _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_393_0.txt |
# torch.gt ¶
torch. gt ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [
Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes input > other \text{input} > \text{other} input > other
element-wise.
The second argument can be a number or a tensor whose shape is [ broadcastable... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_418_0.txt |
# torch.transpose ¶
torch. transpose ( _ input _ , _ dim0 _ , _ dim1 _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Returns a tensor that is a transposed version of ` input ` . The given
dimensions ` dim0 ` and ` dim1 ` are swapped.
If ` input ` is a strided tensor then the resu... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_416_0.txt |
# torch.swapaxes ¶
torch. swapaxes ( _ input _ , _ axis0 _ , _ axis1 _ ) → [ 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_204_0.txt |
# torch.fmax ¶
torch. fmax ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [
Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes the element-wise maximum of ` input ` and ` other ` .
This is like [ ` torch.maximum() ` ](torch.maximum.html#torch.maximum
"torch.maximum") excep... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_361_0.txt |
# torch.Tensor.fix ¶
Tensor. fix ( ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_39_5.txt | lt.html#torch.lt "torch.lt") | Unifies names from inputs
[ ` torch.manual_seed() ` ](generated/torch.manual_seed.html#torch.manual_seed "torch.manual_seed") | None
[ ` Tensor.masked_fill() ` ](tensors.html#torch.Tensor.masked_fill "torch.Tensor.masked_fill") , ` torch.masked_fill() ` | Keeps input names
... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_32_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_23.txt | utions.binomial.Binomial.has_enumerate_support)
* [ (torch.distributions.categorical.Categorical attribute) ](distributions.html#torch.distributions.categorical.Categorical.has_enumerate_support)
* [ (torch.distributions.one_hot_categorical.OneHotCategorical attribute) ](distributions.html#torch.distributions.o... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_37_8.txt | rding to 1 or 2 every time, is a valid
alternative to ` model.zero_grad() ` or ` optimizer.zero_grad() ` that may
improve performance for some networks.
### Manual gradient layouts ¶
If you need manual control over ` .grad ` ’s strides, assign ` param.grad =
` a zeroed tensor with desired strides before the fir... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_371_0.txt |
# torch.logical_and ¶
torch. logical_and ( _ input _ , _ other _ , _ * _ , _ out = None _ )
→ [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes the element-wise logical AND of the given input tensors. Zeros are
treated as ` False ` and nonzeros are treated as ` True ` .
Paramet... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_58_51.txt | .FloatTensor method) ](sparse.html#torch.sparse.FloatTensor.sub)
* [ (torch.Tensor method) ](tensors.html#torch.Tensor.sub)
* [ sub_() (torch.sparse.FloatTensor method) ](sparse.html#torch.sparse.FloatTensor.sub_)
* [ (torch.Tensor method) ](tensors.html#torch.Tensor.sub_)
* [ Subset (class in torch.utils.d... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_64_2.txt | h.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/Solve_CUDA_out_of_memory_3_0.txt | ## Adding More Memory with Another GPU
When you’re training larger models or dealing with extensive datasets,
enlarging your computational resources becomes a necessity. Employing
additional GPUs can be one way to address this. If your system or cluster
houses more than one GPU, you can utilize their extra memory and... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_344_0.txt |
# torch.Tensor.half ¶
Tensor. half ( _ memory_format = torch.preserve_format _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_16_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_65_1.txt | torch.nn.parallel.DistributedDataParallel") evolves over time. This design
note is written based on the state as of v1.4.
[ ` torch.nn.parallel.DistributedDataParallel `
](../generated/torch.nn.parallel.DistributedDataParallel.html#torch.nn.parallel.DistributedDataParallel
"torch.nn.parallel.DistributedDataParallel")... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_233_0.txt |
# torch.Tensor.clamp ¶
Tensor. clamp ( _ min = None _ , _ max = None _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_244_0.txt |
# torch.Tensor.new_tensor ¶
Tensor. new_tensor ( _ data _ , _ * _ , _ dtype = None _ , _ device =
None _ , _ requires_grad = False _ , _ layout = torch.strided _ , _
pin_memory = False _ ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
Returns a new Tensor with ` data ` as... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_58_28.txt | rp() (in module torch) ](generated/torch.lerp.html#torch.lerp)
* [ (torch.Tensor method) ](tensors.html#torch.Tensor.lerp)
* [ lerp_() (torch.Tensor method) ](tensors.html#torch.Tensor.lerp_)
* [ less_than (in module torch.distributions.constraints) ](distributions.html#torch.distributions.constraints.less_than... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_7_16.txt |
_class_ ` torch.nn.intrinsic.qat. ` ` ConvReLU2d ` ( _in_channels_ ,
_out_channels_ , _kernel_size_ , _stride=1_ , _padding=0_ , _dilation=1_ ,
_groups=1_ , _bias=True_ , _padding_mode='zeros'_ , _qconfig=None_ ) [
[source]
](_modules/torch/nn/intrinsic/qat/modules/conv_fused.html#ConvReLU2d) ¶
A ConvReLU2d ... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_41_3.txt | ffic 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: [ Cookies Policy
](https://www.facebook.com/policies/cookies/)... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_487_0.txt |
# torch.Tensor.scatter_reduce_ ¶
Tensor. scatter_reduce_ ( _ dim _ , _ index _ , _ src _ , _ reduce _ ,
_ * _ , _ include_self = True _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Reduces all values from the ` src ` tensor to the indices specified in the `
index ` tensor in t... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_61_0.txt |
# torch.Tensor.data_ptr ¶
Tensor. data_ptr ( ) → [ int
](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)")
¶
Returns the address of the first element of ` self ` tensor.
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_9_9.txt | for PyTorch (Part 2). Model-Optimization,Production

](intermediate/torchserve_with_ipex_2)
#### [ Multi-Objective Neural Architecture Search with Ax Learn how to use Ax
to search over architectures find optimal tradeoffs between accuracy and
latency. Mod... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_57_14.txt | \mathbf{\Sigma} Σ or a positive
definite precision matrix Σ − 1 \mathbf{\Sigma}^{-1} Σ − 1 or a lower-
triangular matrix L \mathbf{L} L with positive-valued diagonal entries,
such that Σ = L L ⊤ \mathbf{\Sigma} = \mathbf{L}\mathbf{L}^\top Σ = L
L ⊤ . This triangular matrix can be obtained via ... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_19_6.txt | orials)
* [ Docs ](/docs)
* [ Discuss ](https://discuss.pytorch.org)
* [ GitHub Issues ](https://github.com/pytorch/pytorch/issues)
* [ Brand Guidelines ](/assets/brand-guidelines/PyTorch-Brand-Guidelines.pdf)
* Stay up to date
* [ Facebook ](https://www.facebook.com/pytorch)
* [ Twitter ](https://twit... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_197_0.txt |
# torch.nextafter ¶
torch. nextafter ( _ input _ , _ other _ , _ * _ , _ out = None _ )
→ [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Return the next floating-point value after ` input ` towards ` other ` ,
elementwise.
The shapes of ` input ` and ` other ` must be [ broadcastab... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_413_0.txt |
# torch.Tensor.qscheme ¶
Tensor. qscheme ( ) → torch.qscheme ¶
Returns the quantization scheme of a given QTensor.
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_48_4.txt | ft
* cat
* ceil
* celu
* clamp
* clamp_max
* clamp_min
* concat
* copy
* cos
* cumsum
* det
* dim_arange
* div
* dropout
* einsum
* elu
* empty
* empty_like
* eq
* erf
* exp
* expand
* expand_as
* flatten
* floor
* f... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_439_0.txt |
# torch.mode ¶
torch. mode ( _ input _ , _ dim = -1 _ , _ keepdim = False _ , _ *
_ , _ out = None _ ) ¶
Returns a namedtuple ` (values, indices) ` where ` values ` is the mode
value of each row of the ` input ` tensor in the given dimension ` dim ` ,
i.e. a value which appears most often ... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_178_0.txt |
# torch.Tensor.cfloat ¶
Tensor. cfloat ( _ memory_format = torch.preserve_format _ ) → [
Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_401_0.txt |
# torch.maximum ¶
torch. maximum ( _ input _ , _ other _ , _ * _ , _ out = None _ ) →
[ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes the element-wise maximum of ` input ` and ` other ` .
Note
If one of the elements being compared is a NaN, then that element is returned.
` m... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_46_3.txt | one_ , _max_bins=None_ ) [ [source]
](_modules/torch/utils/tensorboard/writer.html#SummaryWriter.add_histogram) ¶
Add histogram to summary.
Parameters
* **tag** ( _string_ ) – Data identifier
* **values** ( [ _torch.Tensor_ ](tensors.html#torch.Tensor "torch.Tensor") _,_ _numpy.array_ _, or_ _stri... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_57_16.txt |
` entropy ` ( ) [ [source]
](_modules/torch/distributions/one_hot_categorical.html#OneHotCategorical.entropy)
¶
` enumerate_support ` ( _expand=True_ ) [ [source]
](_modules/torch/distributions/one_hot_categorical.html#OneHotCategorical.enumerate_support)
¶
` expand ` ( _batch_shape_ , __instance... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_62_7.txt | – The process group to work on
* **async_op** ( [ _bool_ ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.8\)") _,_ _optional_ ) – Whether this op should be an async op
Returns
Async work handle, if async_op is set to True. None, if not async_op or if not
part of the group
` torch.... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_504_0.txt |
# torch.Tensor.resize_ ¶
Tensor. resize_ ( _ * sizes _ , _ memory_format =
torch.contiguous_format _ ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
Resizes ` self ` tensor to the specified size. If the number of elements is
larger than the current storage size, then the underlying s... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_25_5.txt | urns the loss.
_class_ ` torch.optim. ` ` ASGD ` ( _params_ , _lr=0.01_ , _lambd=0.0001_ ,
_alpha=0.75_ , _t0=1000000.0_ , _weight_decay=0_ ) [ [source]
](_modules/torch/optim/asgd.html#ASGD) ¶
Implements Averaged Stochastic Gradient Descent.
It has been proposed in [ Acceleration of stochastic approximation... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_9_5.txt | ch_with_torchaudio.html)
#### [ Forced Alignment with Wav2Vec2 in torchaudio Learn how to use
torchaudio's Wav2Vec2 pretrained models for aligning text to speech Audio

](intermediate/forced_alignment_with_torchaudio_tutorial.html)
#### [ Fast Transformer ... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_220_0.txt |
# torch.bitwise_right_shift ¶
torch. bitwise_right_shift ( _ input _ , _ other _ , _ * _ , _ out =
None _ ) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes the right arithmetic shift of ` input ` by ` other ` bits. The
input tensor must be of integral type. This operator sup... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_11_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_521_0.txt |
# torch.log2 ¶
torch. log2 ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Returns a new tensor with the logarithm to the base 2 of the elements of `
input ` .
y i = log 2 ( x i ) y_{i} = \log_{2} (x_{i}) y i = lo g 2
( x... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_189_0.txt |
# torch.ge ¶
torch. ge ( _ input _ , _ other _ , _ * _ , _ out = None _ ) → [
Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes input ≥ other \text{input} \geq \text{other} input ≥ other
element-wise.
The second argument can be a number or a tensor whose shape is [ broadcas... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_4_0.txt |
# torch.histc ¶
torch. histc ( _ input _ , _ bins = 100 _ , _ min = 0 _ , _ max =
0 _ , _ * _ , _ out = None _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes the histogram of a tensor.
The elements are sorted into equal width bins between [ ` min `
](torch.min.html... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_58_43.txt | rch) ](generated/torch.remainder.html#torch.remainder)
* [ (torch.Tensor method) ](tensors.html#torch.Tensor.remainder)
* [ remainder_() (torch.Tensor method) ](tensors.html#torch.Tensor.remainder_)
* [ remote() (in module torch.distributed.rpc) ](rpc.html#torch.distributed.rpc.remote)
* [ (torch.distribute... | |
pytorch_torch_tensor_functions/Visualizing_PyTorch_memory_4_0.txt | ## Generating Traces when Out of Memory
With memory tracing turned on, it can be helpful to generate a snapshot and a
trace right at the point of running out of memory by registering an observer
with the allocator that will be called everytime it is about to raise an
OutOfMemoryError:
def oom_observer(... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_95_0.txt |
# torch.Tensor.nelement ¶
Tensor. nelement ( ) → [ int
](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)")
¶
Alias for [ ` numel() ` ](torch.Tensor.numel.html#torch.Tensor.numel
"torch.Tensor.numel")
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_48_5.txt | is already standardized in ONNX, we only need to create a node to represent the ONNX operator in the graph.
* If the input argument is a tensor, but ONNX asks for a scalar, we have to explicitly do the conversion. The helper function ` _scalar ` can convert a scalar tensor into a python scalar, and ` _if_scalar_ty... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_58_33.txt | lli.mean)
* [ (torch.distributions.beta.Beta property) ](distributions.html#torch.distributions.beta.Beta.mean)
* [ (torch.distributions.binomial.Binomial property) ](distributions.html#torch.distributions.binomial.Binomial.mean)
* [ (torch.distributions.categorical.Categorical property) ](distributions.htm... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_57_0.txt |
# torch.Tensor.random_ ¶
Tensor. random_ ( _ from=0 _ , _ to=None _ , _ * _ , _ generator=None _
) → [ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Fills ` self ` tensor with numbers sampled from the discrete uniform
distribution over ` [from, to - 1] ` . If not specified, the value... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_47_18.txt | amples:
>>> input = torch.randn((3, 2), requires_grad=True)
>>> target = torch.rand((3, 2), requires_grad=False)
>>> loss = F.binary_cross_entropy(F.sigmoid(input), target)
>>> loss.backward()
### binary_cross_entropy_with_logits ¶
` torch.nn.functional. ` ` binary_cross_entropy_with... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_44_1.txt | --|---
Linear / Identity | 1 1 1
Conv{1,2,3}D | 1 1 1
Sigmoid | 1 1 1
Tanh | 5 3 \frac{5}{3} 3 5
ReLU | 2 \sqrt{2} 2
Leaky Relu | 2 1 \+ negative_slope 2 \sqrt{\frac{2}{1 + \text{negative\\_slope}^2}} 1 \+ negative_slope 2 2
Parameters
* **no... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_40_2.txt | sources
Find development resources and get your questions answered
[ View Resources ](https://pytorch.org/resources)
[ ](https://pytorch.org/)
* [ PyTorch ](https://pytorch.org/)
* [ Get Started ](https://pytorch.org/get-started)
* [ Features ](https://pytorch.org/features)
* [ Ecosystem ](https://pytorch.o... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_62_5.txt | ome into play. ` new_group() ` function can be used to
create new groups, with arbitrary subsets of all processes. It returns an
opaque group handle that can be given as a ` group ` argument to all
collectives (collectives are distributed functions to exchange information in
certain well-known programming patterns).... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_16_3.txt | (es) by
a scale factor and invokes a backward pass on the scaled loss(es). Gradients
flowing backward through the network are then scaled by the same factor. In
other words, gradient values have a larger magnitude, so they don’t flush to
zero.
Each parameter’s gradient ( ` .grad ` attribute) should be unscaled before... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_49_2.txt | dule-torch.autograd "torch.autograd")
records operations on them for automatic differentiation.
>>> x = torch.tensor([[1., -1.], [1., 1.]], requires_grad=True)
>>> out = x.pow(2).sum()
>>> out.backward()
>>> x.grad
tensor([[ 2.0000, -2.0000],
[ 2.0000, 2.0000]])
Each te... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_475_0.txt |
# torch.min ¶
torch. min ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
Returns the minimum value of all elements in the ` input ` tensor.
Warning
This function produces deterministic (sub)gradients unlike ` min(dim=0) `
Parameters
**input** ( [ _Tensor_ ](../ten... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_66_1.txt | typical application:
[

](../_images/cpu_threading_torchscript_inference.svg)
One or more inference threads execute a model’s forward pass on the given
inputs. Each inference thread invokes a JIT interpreter that ... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_435_0.txt |
# torch.diag ¶
torch. diag ( _ input _ , _ diagonal = 0 _ , _ * _ , _ out = None _
) → [ 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... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_7_10.txt | rings if there is only a single list of modules to fuse.
* **inplace** – bool specifying if fusion happens in place on the model, by default a new model is returned
* **fuser_func** – Function that takes in a list of modules and outputs a list of fused modules of the same length. For example, fuser_func([convMo... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_335_0.txt |
# torch.addbmm ¶
torch. addbmm ( _ input _ , _ batch1 _ , _ batch2 _ , _ * _ , _ beta =
1 _ , _ alpha = 1 _ , _ out = None _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Performs a batch matrix-matrix product of matrices stored in ` batch1 ` and `
batch2 ` , with a reduced... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_354_0.txt |
# torch.logdet ¶
torch. logdet ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
Calculates log determinant of a square matrix or batches of square matrices.
It returns ` -inf ` if the input has a determinant of zero, and ` NaN ` if
it has a negative determinant.
Note
Back... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_313_0.txt |
# torch.Tensor.floor ¶
Tensor. floor ( ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_39_6.txt | ad2deg "torch.rad2deg") | Keeps input names
` Tensor.rad2deg_() ` | None
[ ` torch.rand() ` ](generated/torch.rand.html#torch.rand "torch.rand") | Factory functions
[ ` torch.rand() ` ](generated/torch.rand.html#torch.rand "torch.rand") | Factory functions
[ ` torch.randn() ` ](generated/torch.randn... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_28_3.txt | ron-right-orange.svg)
](large_scale_deployments.html "Features for large-scale deployments") [
 Previous ](extending.html
"Extending PyTorch")
* * *
© Copyright 2019, Torch Contributors.
Built with [ Sphinx ](http://sphinx-doc.org/) using a [ theme
](https://github.com/... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_139_0.txt |
# torch.Tensor.less ¶
Tensor. less ( ) ¶
lt(other) -> Tensor
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_36_1.txt | ors: a tensor of values
and a 2D tensor of indices. A sparse tensor can be constructed by providing
these two tensors, as well as the size of the sparse tensor (which cannot be
inferred from these tensors!) Suppose we want to define a sparse tensor with
the entry 3 at location (0, 2), entry 4 at location (1, 0), and en... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_414_0.txt |
# torch.ceil ¶
torch. ceil ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Returns a new tensor with the ceil of the elements of ` input ` , the
smallest integer greater than or equal to each element.
For integer inputs, follows the array-api con... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_517_0.txt |
# torch.Tensor.frac ¶
Tensor. frac ( ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_419_0.txt |
# torch.Tensor.masked_fill ¶
Tensor. masked_fill ( _ mask _ , _ value _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Out-of-place version of [ ` torch.Tensor.masked_fill_() `
](torch.Tensor.masked_fill_.html#torch.Tensor.masked_fill_
"torch.Tensor.masked_fill_")
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_21_2.txt | ntioned above. For output Tensors that are not of differentiable type
(integer types for example), they won’t be marked as requiring gradients.
Below you can find code for a ` Linear ` function from ` torch.nn ` , with
additional comments:
# Inherit from Function
class LinearFunction(Function):
... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_39_7.txt | ze() ` ](tensors.html#torch.Tensor.size "torch.Tensor.size") | None
[ ` Tensor.split() ` ](tensors.html#torch.Tensor.split "torch.Tensor.split") , [ ` torch.split() ` ](generated/torch.split.html#torch.split "torch.split") | Keeps input names
[ ` Tensor.sqrt() ` ](tensors.html#torch.Tensor.sqrt "torch.Tenso... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_225_0.txt |
# torch.Tensor.renorm ¶
Tensor. renorm ( _ p _ , _ dim _ , _ maxnorm _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_65_3.txt | ule which call into C++ libraries. Its ` _sync_param ` function performs intra-process parameter synchronization when one DDP process works on multiple devices, and it also broadcasts model buffers from the process with rank 0 to all other processes. The inter-process parameter synchronization happens in ` Reducer.cpp... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_7_0.txt |
# torch.Tensor.sinc ¶
Tensor. sinc ( ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_242_0.txt |
# torch.Tensor.is_cuda ¶
Tensor. is_cuda ¶
Is ` True ` if the Tensor is stored on the GPU, ` False ` otherwise.
| |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_336_0.txt |
# torch.acosh ¶
torch. acosh ( _ input _ , _ * _ , _ out = None _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Returns a new tensor with the inverse hyperbolic cosine of the elements of `
input ` .
out i = cosh − 1 ( input i ) \text{out}_{i} =
\cosh^{-1}(\text{input}... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_27_6.txt | angle (in radians) of the given ` input ` tensor.
[ ` asin ` ](generated/torch.asin.html#torch.asin "torch.asin") | Returns a new tensor with the arcsine of the elements of ` input ` .
[ ` asinh ` ](generated/torch.asinh.html#torch.asinh "torch.asinh") | Returns a new tensor with the inverse hyperbolic sine... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_58_11.txt | orch.nn.Conv2d)
* [ (class in torch.nn.qat) ](quantization.html#torch.nn.qat.Conv2d)
* [ (class in torch.nn.quantized) ](quantization.html#torch.nn.quantized.Conv2d)
* [ conv2d() (in module torch.nn.functional) ](nn.functional.html#torch.nn.functional.conv2d)
* [ (in module torch.nn.quantized.functional) ... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_2_0.txt |
# torch.Tensor.ravel ¶
Tensor. ravel ( ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
see [ ` torch.ravel() ` ](torch.ravel.html#torch.ravel "torch.ravel")
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_48_2.txt | conda-forge onnx
Then, you can run:
import onnx
# Load the ONNX model
model = onnx.load("alexnet.onnx")
# Check that the IR is well formed
onnx.checker.check_model(model)
# Print a human readable representation of the graph
onnx.helper.printable_graph(model.gr... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_49_8.txt | =torch.preserve_format_ ) → Tensor ¶
` self.char() ` is equivalent to ` self.to(torch.int8) ` . See ` to() ` .
Parameters
**memory_format** ( [ ` torch.memory_format `
](tensor_attributes.html#torch.torch.memory_format
"torch.torch.memory_format") , optional) – the desired memory format of
returne... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_41_0.txt | [ ](https://pytorch.org/)
* [ Get Started ](https://pytorch.org/get-started)
* [ Ecosystem ](https://pytorch.org/ecosystem)
* Edge
[ About PyTorch Edge ](https://pytorch.org/edge) [ ExecuTorch
](https://pytorch.org/executorch)
* [ Blog ](https://pytorch.org/blog/)
* [ Tutorials ](https://pytorch.org/tuto... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_47_0.txt |
# torch.det ¶
torch. det ( _ input _ ) → [ Tensor ](../tensors.html#torch.Tensor
"torch.Tensor") ¶
Alias for [ ` torch.linalg.det() ` ](torch.linalg.det.html#torch.linalg.det
"torch.linalg.det")
| |
pytorch_torch_tensor_functions/Pytorch_Documentations_27_11.txt |
[ ` fliplr ` ](generated/torch.fliplr.html#torch.fliplr "torch.fliplr") | Flip array in the left/right direction, returning a new tensor.
[ ` flipud ` ](generated/torch.flipud.html#torch.flipud "torch.flipud") | Flip array in the up/down direction, returning a new tensor.
[ ` rot90 ` ](generated/torch.ro... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_423_0.txt |
# torch.Tensor.stride ¶
Tensor. stride ( _ dim _ ) → tuple or int ¶
Returns the stride of ` self ` tensor.
Stride is the jump necessary to go from one element to the next one in the
specified dimension [ ` dim ` ](torch.Tensor.dim.html#torch.Tensor.dim
"torch.Tensor.dim") . A tuple of all strides... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_209_0.txt |
# torch.equal ¶
torch. equal ( _ input _ , _ other _ ) → [ bool
](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.12\)")
¶
` True ` if two tensors have the same size and elements, ` False `
otherwise.
Example:
>>> torch.equal(torch.tensor([1, 2]), torch.tensor([... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_47_7.txt | the target output size (single integer)
### adaptive_avg_pool2d ¶
` torch.nn.functional. ` ` adaptive_avg_pool2d ` ( _input_ , _output_size_ )
[ [source] ](_modules/torch/nn/functional.html#adaptive_avg_pool2d) ¶
Applies a 2D adaptive average pooling over an input signal composed of several
input planes.
... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_464_0.txt |
# torch.minimum ¶
torch. minimum ( _ input _ , _ other _ , _ * _ , _ out = None _ ) →
[ Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
Computes the element-wise minimum of ` input ` and ` other ` .
Note
If one of the elements being compared is a NaN, then that element is returned.
` m... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_52_2.txt | l1d") | Applies a 1D average pooling over an input signal composed of several input planes.
[ ` nn.AvgPool2d ` ](generated/torch.nn.AvgPool2d.html#torch.nn.AvgPool2d "torch.nn.AvgPool2d") | Applies a 2D average pooling over an input signal composed of several input planes.
[ ` nn.AvgPool3d ` ](generated/torch... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_434_0.txt |
# torch.Tensor.size ¶
Tensor. size ( _ dim = None _ ) → torch.Size or int ¶
Returns the size of the ` self ` tensor. If ` dim ` is not specified, the
returned value is a ` torch.Size ` , a subclass of [ ` tuple `
](https://docs.python.org/3/library/stdtypes.html#tuple "\(in Python v3.12\)")
. ... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_108_0.txt |
# torch.Tensor.double ¶
Tensor. double ( _ memory_format = torch.preserve_format _ ) → [
Tensor ](../tensors.html#torch.Tensor "torch.Tensor") ¶
| |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_341_0.txt |
# torch.smm ¶
torch. smm ( _ input _ , _ mat _ ) → [ Tensor
](../tensors.html#torch.Tensor "torch.Tensor") ¶
Performs a matrix multiplication of the sparse matrix ` input ` with the
dense matrix ` mat ` .
Parameters
* **input** ( [ _Tensor_ ](../tensors.html#torch.Tensor "torch.Tensor") ) ... | |
pytorch_torch_tensor_functions/pytorch_torch_tensor_functions_429_0.txt |
# torch.Tensor.is_contiguous ¶
Tensor. is_contiguous ( _ memory_format = torch.contiguous_format _ ) →
[ bool ](https://docs.python.org/3/library/functions.html#bool "\(in Python
v3.12\)") ¶
Returns True if ` self ` tensor is contiguous in memory in the order
specified by memory format.
Parameters
... | |
pytorch_torch_tensor_functions/Pytorch_Documentations_59_3.txt | the following
properties:
* It always prepends a new dimension as the batch dimension.
* It automatically converts NumPy arrays and Python numerical values into PyTorch Tensors.
* It preserves the data structure, e.g., if each sample is a dictionary, it outputs a dictionary with the same set of keys but bat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.