ValueError: 'transform' does not handle supports of type 'categorical',how to fix the problem?


#1

/anaconda3/lib/python3.6/site-packages/edward/inferences/sgld.py in initialize(self, step_size, *args, **kwargs)
53 “”"
54 self.step_size = step_size
—> 55 return super(SGLD, self).initialize(*args, **kwargs)
56
57 def build_update(self):

~/anaconda3/lib/python3.6/site-packages/edward/inferences/monte_carlo.py in initialize(self, *args, **kwargs)
95 kwargs[‘n_iter’] = np.amin([qz.params.shape.as_list()[0] for
96 qz in six.itervalues(self.latent_vars)])
—> 97 super(MonteCarlo, self).initialize(*args, **kwargs)
98
99 self.n_accept = tf.Variable(0, trainable=False, name=“n_accept”)

~/anaconda3/lib/python3.6/site-packages/edward/inferences/inference.py in initialize(self, n_iter, n_print, scale, auto_transform, logdir, log_timestamp, log_vars, debug)
233
234 # transform z to an unconstrained space
–> 235 z_unconstrained = transform(z)
236 self.transformations[z] = z_unconstrained
237

~/anaconda3/lib/python3.6/site-packages/edward/util/random_variables.py in transform(x, *args, **kwargs)
853 else:
854 msg = “‘transform’ does not handle supports of type ‘{}’”.format(support)
–> 855 raise ValueError(msg)
856
857 new_x = TransformedDistribution(x, bij, *args, **kwargs)

ValueError: ‘transform’ does not handle supports of type ‘categorical’