Skip to content
Advertisement

Tag: numpy

Merge two Lists of different size

I have an issue with some part of my code, I’m fetching two apis and then mixing the results in one array: Initialy the two arrays seems like this (although they can be empty or with more or less data): Their shapes are: So of course, when I try to append them in the 2nd dimension: I get this error:

Custom data generator

I have a standard directory structure of train, validation, test, and each contain class subdirectories. I want to use the flow_from_directory API, but all I can find is an ImageDataGenerator, and the files I have are raw numpy arrays (generated with arr.tofile(…)). Is there an easy way to use ImageDataGenerator with a custom file loader? I’m aware of flow_from_dataframe, but

Advertisement