Home > Mobile >  How to handle NaN values in Activeloop Hub datasets?
How to handle NaN values in Activeloop Hub datasets?

Time:03-28

I am working on converting a dataset into Activeloop Hub format. The dataset I am working with has NaN values however I am not sure how to handle these values with the Hub dataset format. The NaN values are appearing in the labels of the dataset.

CodePudding user response:

It sounds like there are no labels for the samples. If so, then upload an empty sample for those labels. Please note that appending an empty sample is not the same as skipping a sample.

If the NaN values are representing images, videos, etc that do not have labels, they should be uploaded as empty samples like this: ds.labels.append(np.zeros((0,))).

  • Related