Exemple #1
0
 def preprocess_for_eval(self, raw_input_batch: spec.Tensor,
                         raw_label_batch: spec.Tensor, train_mean: spec.Tensor,
                         train_stddev: spec.Tensor) -> spec.Tensor:
   del train_mean
   del train_stddev
   N = raw_input_batch.size()[0]
   raw_input_batch = raw_input_batch.view(N, -1)
   return (raw_input_batch.to(DEVICE), raw_label_batch.to(DEVICE))
 def preprocess_for_eval(self, raw_input_batch: spec.Tensor,
                         raw_label_batch: spec.Tensor, train_mean: spec.Tensor,
                         train_stddev: spec.Tensor) -> spec.Tensor:
   del train_mean
   del train_stddev
   return (raw_input_batch.float().to(DEVICE), raw_label_batch.to(DEVICE))