def flatten(self, x): # HACK: always work on flattened representation if x.ndim < 2: return x return special.from_onehot_n(x)
def unflatten_n(self, x): return special.from_onehot_n(x)
def unflatten_n(self, x): if config.TF_NN_SETTRACE: ipdb.set_trace() return special.from_onehot_n(x)
def unflatten_n(self, x): if x.shape[1] == 1: return x else: return special.from_onehot_n(x)