Can i sample without any observation but only potential?

sure, and sorry i was using pymc2. it’s a lot of trouble to do boolean operation with theano

import numpy as np
import pymc as pm
gs = np.random.uniform(size=(4, 3))
seed = pm.Normal('seed', 0, 1, size=[gs.shape[1], 1])
@pm.deterministic(name='label', trace=True)
def label(seed=seed):
  return gs.dot(seed) > 0

@pm.potential
def value(label=label):
  return label.T.dot(gs).sum()

model = pm.MCMC([seed, label, value])
trace = model.sample(10)
assert trace != None