Closed carmocca closed 2 years ago
I think it would just be easier to just check the type and convert tensors as part of the encode procedure of the NDarray field. Thoughts ?
I could also add what you suggest and make it extend NDarray field.
Any preference ? (Both are super easy and I'll add that in the next release for sure)
I think the added class (even if it's a minimal extension) is the simplest option and most natural to users
Trying to balance ICML submissions and adding features to FFCV but I'll try to have this today.
Sorry for the ICML delay. This should land in v0.0.4 (possibly release candidate tonight)
There should be a counterpart to
NDArrayField
for torch Tensors. This would be useful to convert existingtorch.utils.data.Dataset
s to.beton
.Following the API described in this guide: https://docs.ffcv.io/writing_datasets.html#writing-a-dataset-to-ffcv-format
Using
NDArrayField
currently fails with: