Skip to content

Commit

Permalink
2024-11-28 nightly release (19fef3d)
Browse files Browse the repository at this point in the history
  • Loading branch information
pytorchbot committed Nov 28, 2024
1 parent 83e4bcc commit c194934
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ docs/source/auto_examples/
docs/source/gen_modules/
docs/source/generated/
docs/source/models/generated/
docs/source/sg_execution_times.rst
# pytorch-sphinx-theme gets installed here
docs/src

Expand All @@ -42,3 +43,5 @@ xcuserdata/
# direnv
.direnv
.envrc

scripts/release_notes/data.json
2 changes: 1 addition & 1 deletion references/depth/stereo/utils/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def make_gaussian_kernel(kernel_size: int, sigma: float) -> torch.Tensor:
y = torch.arange(kernel_size, dtype=torch.float32)
x = x - (kernel_size - 1) / 2
y = y - (kernel_size - 1) / 2
x, y = torch.meshgrid(x, y)
x, y = torch.meshgrid(x, y, indexing="ij")
grid = (x**2 + y**2) / (2 * sigma**2)
kernel = torch.exp(-grid)
kernel = kernel / kernel.sum()
Expand Down
4 changes: 2 additions & 2 deletions references/video_classification/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def main(args):

if args.cache_dataset and os.path.exists(cache_path):
print(f"Loading dataset_train from {cache_path}")
dataset, _ = torch.load(cache_path, weights_only=True)
dataset, _ = torch.load(cache_path, weights_only=False)
dataset.transform = transform_train
else:
if args.distributed:
Expand Down Expand Up @@ -201,7 +201,7 @@ def main(args):

if args.cache_dataset and os.path.exists(cache_path):
print(f"Loading dataset_test from {cache_path}")
dataset_test, _ = torch.load(cache_path, weights_only=True)
dataset_test, _ = torch.load(cache_path, weights_only=False)
dataset_test.transform = transform_test
else:
if args.distributed:
Expand Down
2 changes: 1 addition & 1 deletion torchvision/datasets/lsun.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __len__(self) -> int:


class LSUN(VisionDataset):
"""`LSUN <https://www.yf.io/p/lsun>`_ dataset.
"""`LSUN <https://paperswithcode.com/dataset/lsun>`_ dataset.
You will need to install the ``lmdb`` package to use this dataset: run
``pip install lmdb``
Expand Down
2 changes: 1 addition & 1 deletion torchvision/models/googlenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def eager_outputs(self, x: Tensor, aux2: Tensor, aux1: Optional[Tensor]) -> Goog

def forward(self, x: Tensor) -> GoogLeNetOutputs:
x = self._transform_input(x)
x, aux1, aux2 = self._forward(x)
x, aux2, aux1 = self._forward(x)
aux_defined = self.training and self.aux_logits
if torch.jit.is_scripting():
if not aux_defined:
Expand Down
2 changes: 1 addition & 1 deletion torchvision/models/maxvit.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _make_block_input_shapes(input_size: Tuple[int, int], n_blocks: int) -> List


def _get_relative_position_index(height: int, width: int) -> torch.Tensor:
coords = torch.stack(torch.meshgrid([torch.arange(height), torch.arange(width)]))
coords = torch.stack(torch.meshgrid([torch.arange(height), torch.arange(width)], indexing="ij"))
coords_flat = torch.flatten(coords, 1)
relative_coords = coords_flat[:, :, None] - coords_flat[:, None, :]
relative_coords = relative_coords.permute(1, 2, 0).contiguous()
Expand Down

0 comments on commit c194934

Please sign in to comment.