Skip to main content
0 votes
1 answer
21 views

Torch tensor dataloader shape issue

I have a simple application of torch.DataLoader that gets a nice performance boost. It's created by the tensor_loader in the following example. from torch.utils.data import DataLoader, TensorDataset, ...
philosofool's user avatar
1 vote
0 answers
46 views

Error When Using Batch Size Greater Than 1 in PyTorch

I'm building a neural network to predict how an image will be partitioned during compression using VVC (Versatile Video Coding). The model takes a single Y-frame from a YUV420 image as input and uses ...
조동건's user avatar
1 vote
0 answers
48 views

PyTorch Forecasting TimeSeriesDataSet Returns None in DataLoader Batch

I am working with pytorch-forecasting to create a TimeSeriesDataSet where I have 30 target variables that I want to predict. However, when I pass this dataset to a DataLoader, I encounter an issue: ...
Farmer's user avatar
  • 33
1 vote
1 answer
33 views

RuntimeError: Given groups=1, weight of size [64, 3, 3, 7, 7], expected input[1, 8, 3, 112, 112] to have 3 channels, but got 8 channels instead

import os import shutil import random import torch import torchvision.transforms as transforms import cv2 import numpy as np from torch.utils.data import Dataset, DataLoader import torch.nn as nn ...
Can Gürcüoğlu's user avatar
0 votes
0 answers
13 views

Does Modifying an Attribute of a Custom Dataset Affect Both Subsets After random_split in PyTorch?

I am working on a binary classification task using an audio dataset, which is already divided into training and testing sets. However, I also need a validation set, so I split the training set into ...
GauravGiri's user avatar
0 votes
0 answers
44 views

Pytorch DataLoader loops are slower than expected

I created a training loop with pytorch's TensorDataset and DataLoader classes, but encounter an interesting behavior. The progress intermittently halts every 10-15 batches with seemingly no reason. I ...
Lev_Descartski's user avatar
0 votes
0 answers
20 views

MONAI: How to incorporate `SlidingPatchWSIDataset` with `MaskedPatchWSIDataset`

I am wanting to use MONAI's SlidingPatchWSIDataset to extract patches from my whole slide images during inference. However, I also require the WSI to be masked so as to remove the unwanted background ...
Kevin Sweeney's user avatar
1 vote
0 answers
36 views

How to investigate memory consumption of pytorch_geometric data

I am working on a framework that uses pytorch_geometric graph data stored in the usual way in data.x and data.edge_index Additionally, the data loading process appends multiple other keys to that data ...
Severin Magel's user avatar
0 votes
0 answers
46 views

How can I calculate the training and validation accuracy and losses while having an IterableDataSet and DataLoader?

I'm defining my own train() function - that does training and validation (perhaps the name of the function is not the most descriptive here) Since I'm using a custom iterable dataset along with a ...
Saffy's user avatar
  • 15
0 votes
1 answer
17 views

How to apply min-max scaling on a IterableDataset?

I'm using an iterableDataset because I have massive amounts of data. And since IterableDataset does not store all data in memory, we cannot directly compute min/max on the entire dataset before ...
Saffy's user avatar
  • 15
0 votes
0 answers
11 views

IndexError: Index Out of Bounds for Dimension 0 in Custom Keypoint R-CNN Dataset for COCO Annotations in PyTorch

I'm working on training a custom Keypoint R-CNN model using PyTorch, and I’m encountering issues while implementing the custom dataset and dataloader for COCO-style annotations. My dataset includes ...
Venkat n's user avatar
0 votes
0 answers
53 views

Training stuck with num_workers > 0, but CPU is used instead of GPU with num_workers=0

I'm facing an issue with num_workers while training my model using PyTorch. If I set num_workers = 0, the training starts, but the model is utilizing the CPU instead of the GPU. Although CUDA is ...
Kamal Basha's user avatar
1 vote
2 answers
57 views

Is there a way to use list of indices to simultaneously access the modules of nn.ModuleList in python?

Is there a way to use list of indices to simultaneously access the modules of nn.ModuleList in python? I am working with pytorch ModuleList as described below, decision_modules = nn.ModuleList([nn....
Aleph's user avatar
  • 217
0 votes
0 answers
17 views

How to see what file Dask is working with at any time for stateful dataloader

Problem: I am training an LLM for which my dataloader makes use of Dask to read in data. During LLM training, sometimes something breaks and you need to start again from the last checkpoint. Ideally ...
d-gg's user avatar
  • 662
0 votes
1 answer
81 views

Dataloader on Iterable dataset yields copied batches for num_workers > 0

The title says it all. An iterable dataset with a multi-worker dataloader yields more batches than it should (seems that each worker yields all the batches separately). Here is an MWE: import torch ...
Ilya Kuleshov's user avatar

15 30 50 per page
1
2 3 4 5
32