Problem with numpy arrays dataset (AttributeError)


#1

Hi,

I followed the “How to upload custom dataset” videos and now I’m trying to upload mine.
It’s composed of numpy arrays of shape (128, X) : the second dimension isn’t fixed. They represent spectrograms data (computed from audio files which vary in length).

When I try to create my model, I get the following error : “AttributeError : ‘numpy.ndarray’ object has no attribute ‘files’”. I’ve no idea what it means.

If someone could help me to find what is the problem.
Thanks in advance.


#2

Can you send the snapshot of the model and you have to use fixed size of numpy array so for 2nd variable dimension you can add padding to make them same.
Thanks


#3

Thank you for the answer.
Here is the model


The problem is that some of the arrays are many times bigger than others, so I think it’s preferable to cut the big ones into smaller arrays and then add padding to make them all the same size as you said.
I’ve seen elsewhere that it’s possible to use masks to “cancel” paddings, is it possible here with DL Studio ?


#4

I just tried fixed size numpy arrays but I always got the error message : “AttributeError : ‘numpy.ndarray’ object has no attribute ‘files’”.
The csv is ok, the files name inside are good, the classes too and my numpy arrays are all the same size (128, 601).
Don’t know what is wrong.


#5

No there is no mask in DLS
Next when you are getting this error while training or at the time of data uploading.
If you can mail us the dataset @ support@deepcognition.ai.
Thanks


#6

Hi.
I am trying to use my dataset with numpy input and output, and I am getting that same error.
“ AttributeError : ‘numpy.ndarray’ object has no attribute ‘files’ ”
It must be an issue on the dataset, because is giving the error with only the input component on the board. But I can’t find what it is.
error2-
Also, I take this opportunity to request more tutorials about different kinds of networks, I have buyed the course of Udemy but is very limited.
Thanks.


#7

Hi can you share the snapshot of the dataset file structure and the csv file. it might be because of the wrong location of the file.


#8

I solved the problem by simply using .npz files instead of .npy.
These silly problems could be easily solved with a good documentation or an error message.
Here is how to load and save .npz Importing Embedding matrices