Example #1
0
 def flatten(self, x):
     # HACK: always work on flattened representation
     if x.ndim < 2:
         return x
     return special.from_onehot_n(x)
Example #2
0
 def unflatten_n(self, x):
     return special.from_onehot_n(x)
Example #3
0
 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)
Example #5
0
 def flatten(self, x):
     # HACK: always work on flattened representation
     if x.ndim < 2:
         return x
     return special.from_onehot_n(x)
Example #6
0
 def unflatten_n(self, x):
     if x.shape[1] == 1:
         return x
     else:
         return special.from_onehot_n(x)