Comments (6)
Heya @JanuszL -- hope you are well!
Also in many cases, the pipeline definition determines the output shape - it is a common pattern to use resize/crop operation to have a fixed shape at the data processing output.
Good point. This might be the smarter option actually. Will be there any issues with memory if the pipeline is re-init?
Can you also describe in more detail your use case and why you need to run the processing to determine the shape?
It is mainly to handle pipelines that return augmentation multiplicity > 1 (eg: DINO and other self-supervised algorithms use 2 images of resolution1 and 10x images of resolution2 in a minibatch). But you are right. This should be determinable apriori.
from dali.
Hi @jramapuram,
Thank you for reaching out.
In your case, you can either recreate the pipeline to fully reset it, or keep the output of the first iteration and reuse it in further training.
Also in many cases, the pipeline definition determines the output shape - it is a common pattern to use resize/crop operation to have a fixed shape at the data processing output.
Can you also describe in more detail your use case and why you need to run the processing to determine the shape?
from dali.
@JanuszL : I tried deleting the pipeline and re-creating it, however there seems to be a weird oddity with GPU memory over the entire training run 😬
GPU Memory (%) | del dataloader; gc.collect() |
---|---|
68.76% | N/A (baseline single pipeline creation) |
77.1% | yes |
76.9% | yes |
These are on an A100 80G x8 instance.
from dali.
Hi @jramapuram,
If you want to release DALI memory that is kept in the pool, please check this API.
from dali.
Still not working as expected @JanuszL -- memory at 77%. Any thoughts?
class DataLoader:
self.train_loader, self.test_loader, self.valid_loader = self._recreate_dataloaders()
# ...
self._delete_loaders()
self.train_loader, self.test_loader, self.valid_loader = self._recreate_dataloaders()
def _delete_loaders(self):
"""Delete loaders if they exist."""
if self.train_loader is not None:
del self.train_loader
if self.test_loader is not None:
del self.test_loader
if self.valid_loader is not None:
del self.valid_loader
# Release memory in pool
ReleaseUnusedMemory()
# Force garbage collection
gc.collect()
from dali.
Can you provide a standalone repro for the case you see? Now I can only guess what may be going on, and I can just miss details that differentiate your code from the case I have in mind.. It can even be a toy example using data from https://github.com/NVIDIA/DALI_extra.
from dali.
Related Issues (20)
- how to do a image zoom? HOT 9
- Unrecognized image format HOT 1
- Inference Model without converting TensorGPU to TensorCPU HOT 2
- Stack a batch in one batch of this shape HOT 4
- How to get center crop HOT 6
- GitHub Roadmap 2024 HOT 4
- Why is the val_loss curve trained through Dali data loading method oscillating? HOT 2
- NumPy decoder HOT 8
- Using JPEG hardware decoder with DALI on A100 GPU
- Extracting properties from a list of DataNodes HOT 5
- A100 hardware decoder HOT 1
- Extract motion vectors HOT 7
- Segmentation fault when using 'mixed' HOT 5
- Bbox Pruning Too Aggressive? HOT 5
- Indexing video with binary mask HOT 1
- source_info tensor not guaranteed to contain correct data HOT 1
- 16 bit gray scale Image read error HOT 1
- COCO Reader pixelwise_masks Emtpy Output HOT 7
- Dali on Jetson: nvidia.dali.fn.readers.video_resize is missing HOT 4
- Numpy reader test (GDS) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dali.