Hello everyone,
I’m having an issue with NUTS in that it produces the error
Traceback (most recent call last):
File "/Users/dhooghe/anaconda3/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in __call__
self.fn() if output_subset is None else\
NotImplementedError: c_sync: expected an aligned array, got non-aligned array of type 12 with 2 dimensions, with 3 last dims -1, 62, 14000 and 3 last strides -1 8, 496.
This issue only occurs when I use a lot of data points. If I downsize to 2000 it works. ADVI and metropolis work with the number of data points I want to use without downsizing. My model looks like:
def CreateModel(X, Y, NumberOfFeatures, NumberOfClasses):
with pm.Model() as Model:
Slope = pm.Normal("Slope", 0., 100., shape=(NumberOfFeatures, NumberOfClasses))
Intercept = pm.Normal("Intercept", 0., 100., shape = NumberOfClasses, testval = np.ones(NumberOfClasses))
LogOdds = pm.math.dot(X, Slope) + Intercept
Output = pm.Multinomial("Bernoulli", p = logit(LogOdds), n = 1, observed = Y)
return Model
with X and Y being theano shared variables. X has dimensions [14000, 62] with y having dimensions of [14000, 4]. I’m thinking this is a memory issue but I have 16 GB and the other samples work. Any thoughts? Thank you!