I am trying to run a simple auto encoder using nolearn
:
import nolearn
from nolearn.dbn import DBN
from sklearn.cross_validation import train_test_split
data=np.load('doc_user_matrix.npy')
print (data.shape) #outputs: (10000,500)
(x_train, x_test, y_train, y_test)=train_test_split(data,data,test_size = 0.33)
hidden_layer=10
ae = DBN([x_train.shape[0], hidden_layer, x_train.shape[0]],
learn_rates = 0.3,
learn_rate_decays = 0.9,
epochs = 10)
ae.fit(x_train, x_train)
For some reason I encounter this error:
ValueError: bad input shape (10000, 500)
Can anyone explain why this error occur, and how to solve it ?