I dont get exactly about the number of nodes. My model is:
with model:
theta = pm.Dirichlet("theta", a=alpha, shape=(D, K))
phi = pm.Dirichlet("phi", a=beta, shape=(K, V))
doc = pm.DensityDist('docs', log_lda(theta,phi), observed=LDA_output.T)
D = 283000
K =150
V = 7500
LDA_output.T = (9944576, 3)
In Memory error it d> oesnt give me anything related to number of nodes.
Traceback (most recent call last):
File “”, line 15, in
doc = pm.DensityDist(‘docs’, log_lda(theta,phi), observed=LDA_output.T)
File “C:\Users\Anil\Anaconda3\lib\site-packages\pymc3\distributions\distribution.py”, line 37, in new
return model.Var(name, dist, data, total_size)
File “C:\Users\Anil\Anaconda3\lib\site-packages\pymc3\model.py”, line 832, in Var
total_size=total_size, model=self)
File “C:\Users\Anil\Anaconda3\lib\site-packages\pymc3\model.py”, line 1288, in init
self.logp_elemwiset = distribution.logp(data)
File “”, line 16, in ll_lda
ll = value[:, 2] *pm.math.logsumexp(np.log(theta[value[:, 0].astype(‘int64’)]) + np.log(phi.T[value[:,1].astype(‘int64’)]), axis = 1).ravel()
File “C:\Users\Anil\Anaconda3\lib\site-packages\theano\tensor\var.py”, line 570, in getitem
return self.take(args[axis], axis)
File “C:\Users\Anil\Anaconda3\lib\site-packages\theano\tensor\var.py”, line 614, in take
return theano.tensor.subtensor.take(self, indices, axis, mode)
File “C:\Users\Anil\Anaconda3\lib\site-packages\theano\tensor\subtensor.py”, line 2431, in take
return advanced_subtensor1(a, indices)
File “C:\Users\Anil\Anaconda3\lib\site-packages\theano\gof\op.py”, line 674, in call
required = thunk()
File “C:\Users\Anil\Anaconda3\lib\site-packages\theano\gof\op.py”, line 862, in rval
thunk()
File “C:\Users\Anil\Anaconda3\lib\site-packages\theano\gof\cc.py”, line 1735, in call
reraise(exc_type, exc_value, exc_trace)
File “C:\Users\Anil\Anaconda3\lib\site-packages\six.py”, line 693, in reraise
raise value
MemoryError: None