{"query": "import torch from torch.distributions import constraints from torch.distributions.categorical import Categorical from torch.distributions.utils import clamp_probs, broadcast_all, log_sum_exp from torch.distributions.utils import clamp_probs, broadcast_all, _log_sum_exp from torch.distributions.distribution import Distribution from torch.distributions.transformed_distribution import TransformedDistribution from torch.distributions.transforms import ExpTransform", "pos": ["Leaving this issue here for higher visibility. Originally reported by here: Also mentioned by Piggybacking off of this issue, has strange behavior (reported here: )\nI have fixed this locally. Could I send a PR?\nYes, go ahead!"], "neg": []} {"query": "begin{array}{ll} i_t = sigma(W_{ii} x_t + b_{ii} + W_{hi} h_{(t-1)} + b_{hi}) f_t = sigma(W_{if} x_t + b_{if} + W_{hf} h_{(t-1)} + b_{hf}) g_t = tanh(W_{ig} x_t + b_{ig} + W_{hc} h_{(t-1)} + b_{hg}) g_t = tanh(W_{ig} x_t + b_{ig} + W_{hg} h_{(t-1)} + b_{hg}) o_t = sigma(W_{io} x_t + b_{io} + W_{ho} h_{(t-1)} + b_{ho}) c_t = f_t c_{(t-1)} + i_t g_t h_t = o_t tanh(c_t)", "pos": ["Hi, Looking at the formulas of LSTM in , in the third equation (gt), the suffix of the second W should be changed from W{hc} to W{hg}. The correct formula: gt=tanh(W{ig}xt+b{ig}+W{hg}h{(t\u22121)}+b_{hg}) Cheers, Navid"], "neg": []} {"query": "tmp3 = torch.cuda.FloatTensor(t.size()) self.assertEqual(tmp3.data_ptr(), ptr[0], 'allocation not re-used') def test_noncontiguous_pinned_memory(self): # See issue #3266 x = torch.arange(0, 10).view((2, 5)) self.assertEqual(x.t(), x.t().pin_memory()) def test_caching_pinned_memory(self): cycles_per_ms = get_cycles_per_ms()", "pos": ["Hello, I was experimenting with a custom which receives a batch of different sized integer sequences and pads them to form 2D tensors. I noticed a weird issue for which I created the following MWE: It's probably because of the different memory ordering on Python's side and CUDA's allocator. Tested on K40 and GTX1080 with driver 375.39, CUDA8.\nPin memory is missing a call inside. Should be an easy fix\nfixed via"], "neg": []} {"query": "- [Releases and Contributing](#releases-and-contributing) - [The Team](#the-team) | Python | **`Linux CPU`** | **`Linux GPU`** | |--------|--------------------|------------------| | 2.7.8 | [![Build Status](https://travis-ci.com/apaszke/pytorch.svg?token=shqHbUq29zKDxuqzGcjC&branch=master)](https://travis-ci.com/apaszke/pytorch) | | | 2.7 | [![Build Status](https://travis-ci.com/apaszke/pytorch.svg?token=shqHbUq29zKDxuqzGcjC&branch=master)](https://travis-ci.com/apaszke/pytorch) | [![Build Status](http://build.pytorch.org:8080/buildStatus/icon?job=pytorch-master-py2)](https://build.pytorch.org/job/pytorch-master-py2) | | 3.5 | [![Build Status](https://travis-ci.com/apaszke/pytorch.svg?token=shqHbUq29zKDxuqzGcjC&branch=master)](https://travis-ci.com/apaszke/pytorch) | [![Build Status](http://build.pytorch.org:8080/buildStatus/icon?job=pytorch-master-py3)](https://build.pytorch.org/job/pytorch-master-py3) | | Nightly| [![Build Status](https://travis-ci.com/apaszke/pytorch.svg?token=shqHbUq29zKDxuqzGcjC&branch=master)](https://travis-ci.com/apaszke/pytorch) | | | System | Python | Status | | --- | --- | --- | | Linux CPU | 2.7.8, 2.7, 3.5, nightly | [![Build Status](https://travis-ci.org/pytorch/pytorch.svg?branch=master)](https://travis-ci.org/pytorch/pytorch) | | Linux GPU | 2.7 | [![Build Status](http://build.pytorch.org:8080/buildStatus/icon?job=pytorch-master-py2)](https://build.pytorch.org/job/pytorch-master-py2) | | Linux GPU | 3.5 | [![Build Status](http://build.pytorch.org:8080/buildStatus/icon?job=pytorch-master-py3)](https://build.pytorch.org/job/pytorch-master-py3) | ## More about PyTorch", "pos": ["We should explore using TorchDynamo to capture/optimize optimizer code. I don't anticipate any major issues here, but we should make sure it plays nice with AOT Autograd. cc\nlinking issue related to performance of this:"], "neg": []} {"query": "]] [[ name: free return: self arguments: - THTensor* self ]] [[ name: retain return: self arguments: - THTensor* self ]] [[ python_name: index name: THPTensor_(getValue) only_register: True", "pos": ["Dataloader call getitem as many times as indices in the current batch. In case datasets support a list of indices in one call, or a native python slice object, add a getbatch (optional) to pytorch dataset class. If dataloader sees the dataset has such a method implemented, make it fetch the batch corresping to the list of indices with one getbatch call rather than many getitem calls. This saves the trouble of calling getitem many times in cases where for example a disk file has to be opened then closed for every call and the underlying data structure supports a slicing or lists of indices for example hdf5 files.\nwill support something similar\nis the latest version of this."], "neg": []} {"query": "class InstanceNorm2d(_InstanceNorm): r\"\"\"Applies Instance Normalization over a 4d input that is seen as a mini-batch of 3d inputs .. math:: y = frac{x - mean[x]}{ sqrt{Var[x]} + epsilon} * gamma + beta The mean and standard-deviation are calculated per-dimension separately for each object in a mini-batch. Gamma and beta are learnable parameter vectors of size C (where C is the input size).", "pos": ["why 1.21.6? because that's the oldest supported numpy on windows/python3.10: all cc\nHere is the test for pinning numpy to 1.21.6 The reason its was not pinned to this version is that conda can't properly resolve all the dependencies at this step here:\nIt looks like you are correct, I will put up a PR to pin lower then already pinned:\nHere is the PR:"], "neg": []} {"query": "The upper triangular part of the matrix is defined as the elements on and above the diagonal. The argument :attr:`k` controls which diagonal to consider. The argument :attr:`diagonal` controls which diagonal to consider. - :attr:`k` = 0, is the main diagonal. - :attr:`k` > 0, is above the main diagonal. - :attr:`k` < 0, is below the main diagonal. - :attr:`diagonal` = 0, is the main diagonal. - :attr:`diagonal` > 0, is above the main diagonal. - :attr:`diagonal` < 0, is below the main diagonal. Args: input (Tensor): the input `Tensor` k (int, optional): the diagonal to consider diagonal (int, optional): the diagonal to consider out (Tensor, optional): The result `Tensor` Example::", "pos": ["The states that the argument controls which diagonal to consider. However, this argument is actually named in pytorch 0.2.0."], "neg": []} {"query": "If :attr:`upper` is ``False``, then lower triangular portion is used. .. note:: The eigenvalues are returned in ascending order. If :attr:`input` is a batch of matrices, then the eigenvalues of each matrix in the batch is returned in ascending order. .. note:: Irrespective of the original strides, the returned matrix `V` will be transposed, i.e. with strides `V.contiguous().transpose(-1, -2).stride()`.", "pos": ["Documentation for does not indicate whether or not singular values are returned in descending order. My suspicion is that they are since both LAPACK and MAGMA's ?gesdd return them in descending order. It seems like this should be clarified in the docs to avoid unnecessary sorting, or mistaken assumptions.