I have a tf.keras Model having LSTM as its first layer (3D tensor as input). I need to convert a dask array (3-D) into a dask dataframe (mandatory requirement for the module responsible for fitting the model) with 1 column (each cell is a 3d array.
I'm doing the following:
c1 = da.from_array(np.arange(100000, 190000).reshape((1, 30000, 3)), chunks=1000)
df = ddf.from_array(c1, columns=['Feature'])
This gives me the following error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-46-a352c857c8f5> in <module>()
8 # c3
9
---> 10 df = ddf.from_array(c1, columns=['Feature'])
11 df
12 # # generate dask dataframe
2 frames
/usr/local/lib/python3.7/dist-packages/dask/dataframe/io/io.py in _meta_from_array(x, columns, index)
27 raise ValueError(
28 "from_array does not input more than 2D array, got"
---> 29 " array with shape %r" % (x.shape,)
30 )
31
ValueError: from_array does not input more than 2D array, got array with shape (1, 30000, 3)