def _preprocess(self, data,  train):
if train:<EOL><INDENT>inputs, labels = data<EOL>self.data_mean = inputs.mean(axis=<NUM_LIT:0>)<EOL>self.data_std = inputs.std(axis=<NUM_LIT:0>)<EOL>self.labels_mean = labels.mean(axis=<NUM_LIT:0>)<EOL>self.labels_std = labels.std(axis=<NUM_LIT:0>)<EOL>return ((inputs-self.data_mean)/self.data_std, (labels-self.labels_mean)/self.labels_std)<EOL><DEDENT>else:<EOL><INDENT>return (data-self.data_mean)/self.data_std<EOL><DEDENT>
Zero-mean, unit-variance normalization by default