NVIDIA / DALI

A GPU-accelerated library containing highly optimized building blocks and an execution engine for data processing to accelerate deep learning training and inference applications.
https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html
Apache License 2.0
5.15k stars 621 forks source link

Allow floating point targets on ops.FileReader #2043

Open dreavjr opened 4 years ago

dreavjr commented 4 years ago

I'm working on a a regression task and can't use ops.FileReader since the label format must be an integer. Is there a reason to enforce this restriction, or would it be possible to lift this constraint?

JanuszL commented 4 years ago

Hi, I think it is doable. Probably the easiest one would be to use any as a label holder inside ImageLabelWrapper in this file this file. Add a filed to FileLabelLoader to specify the type stored inside that would come from output type that needs to be added to FileReader (here and here). Of course, appropriate tests need to be added to verify if that works as expected. We would be more than happy to review any PR that would add such functionality.

bensuucar commented 4 years ago

Hi, I have the same problem, I would like to use float as label. I followed the steps you suggested, however I couldn't get it done. Is there any improvement for this problem? Thanks!

JanuszL commented 4 years ago

Hi, We are not working on this, but still, we count on the community to post a PR implementing this.