Skip to content

ValueError: shapes (256,33626) and (33227,800) not aligned: 33626 (dim 1) != 33227 (dim 0) #47

@ouening

Description

@ouening

I use the trained model through:

classifier = SupervisedDBNClassification(hidden_layers_structure=[256, 256],
    learning_rate_rbm=0.05,
    learning_rate=0.1,
    n_epochs_rbm=10,
    n_iter_backprop=100,
    batch_size=32,
    activation_function='relu',
    optimization_algorithm='sgd',
    dropout_p=0.2)

# 如果只需调用训练好的模型,需要注释下面2行
# classifier.fit(train_data, train_label)
# Save the model
# classifier.save('supervised_model.pkl')

# Restore it
classifier = SupervisedDBNClassification.load('supervised_model.pkl')

I got error as title shows:


  File "e:\applications\wpy64-3741\python-3.7.4.amd64\lib\site-packages\dbn\models.py", line 183, in _compute_hidden_units_matrix
    np.dot(self.W, np.transpose(matrix_visible_units)) + self.c[:, np.newaxis]))

  File "<__array_function__ internals>", line 6, in dot

ValueError: shapes (256,33626) and (33227,800) not aligned: 33626 (dim 1) != 33227 (dim 0)

What's the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions