I'm currently trying to use sklearns package for the bernoulli version of the Restricted Boltzmann Machine [RBM], but I don't understand how it works. The dataset I want to use it on is the MNIST-dataset. The very small amount of code I'm using currently is:
def rbm():
#weights = np.zeros((20, 100, 784))
#for j in range(0, epochs):
rbm = BernoulliRBM(n_iter= 1, learning_rate = 0.01, n_components = 100, random_state=0, verbose=True)
rbm.fit(bindigit_trn)
gibbs(rbm.components_)
weights = rbm.components_
return weights
The error code I'm getting is: "This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items."
Can someone help a beginner, how do I make this right?
You can try the following with
scikit-learn digitsdataset: