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