Replies: 1 comment
-
in that case I would suggest to directly construct your subject with something like that:
if your label is just a number then just add it in the subject, if it were an image, you could use tio.LabelMap |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a bunch of data files where each datafile contains a tuple consisting of (sample, label).
Based on previous suggestions I was able to create the following to read in such torch files:
However, the problem with this is that I also need to get the label from these datafiles.
Unfortunately there seems to be no way to pass back the label in this torch_reader, which does make sense since this is part of ScalarImage.
But nevertheless I still need that label. Pytorch does not allow me to just load part of a file as far as I'm aware, so I need some way to also load the label as I am loading the sample. However, I am not sure what the best way to do this might be, there seems to be no easy way to do this in the current framework.
It should be noted that my label is just a single number in this case, if that makes a difference.
Beta Was this translation helpful? Give feedback.
All reactions