TypeError: Unsupported training data type: <class 'numpy.ndarray'> ConvLSTM3D

160 views
Skip to first unread message

alkha mohan

unread,
Mar 22, 2021, 12:28:09 AM3/22/21
to User Group for BigDL and Analytics Zoo
Hi all,

I am trying to use Analytics Zoo ConvLSTM3D for my project. The first layer of my model is a ConvLSTM3D layer, and the input given is 3D data. Initially, the train data was of size (1025,15, 25, 25), but reshaped to (1025, 1, 1, 15, 25, 25) so as to make it 6D in order to input to ConvLSTM3D layer. As I fit the model using model.fit I am getting a type error (TypeError: Unsupported training data type: <class 'numpy.ndarray'>). 

The screenshots of input data, model, and error are attached.  I am fairly new to the area and appreciate your suggestions and helps. 

Many Thanks
Alkha


sample_model.PNG
error.PNG
train_data.PNG

huangka...@gmail.com

unread,
Mar 22, 2021, 12:40:27 AM3/22/21
to User Group for BigDL and Analytics Zoo
Hi Alkha,

In the case x is an ndarray, we require y also to be an ndarray. In your screenshot, you input y=None and therefore it gets the error.
Could you please input y=ytrain to have a try?
Feel free to tell us if you encounter further questions.

Thanks,
Kai

alkha mohan

unread,
Mar 22, 2021, 1:20:51 AM3/22/21
to User Group for BigDL and Analytics Zoo
Hai, Kai

I appreciate your quick response

I have tried proving ytrain as an argument, ytrain is of size (2049,). I have encountered another error, I have attached a screenshot.
NB: I haven't used one-hot encoding here, as I have seen that some of the mnist examples in analytics zoo were not using one-hot-encoding. 

Thanks
Alkha
ytrain_error.PNG
Error.txt

huangka...@gmail.com

unread,
Mar 22, 2021, 6:04:06 AM3/22/21
to User Group for BigDL and Analytics Zoo
Hi Alkha,

Probably you need to check your Java and Spark versions.
When running Analytics Zoo, if with pip, we have tested on pyspark 2.4.3 for Python 3.6/3.7.

Thanks,
Kai
Reply all
Reply to author
Forward
0 new messages