Tensors _preprocess(Tensors inputs) { if (args.Standardize != null) { inputs = args.Standardize(inputs); } if (!string.IsNullOrEmpty(args.Split)) { if (inputs.shape.ndim > 1) { inputs = array_ops.squeeze(inputs, axis: new[] { -1 }); } } return(inputs); }
Tensors _preprocess(Tensors inputs) { Tensor input_tensor = null; if (args.Standardize != null) { input_tensor = args.Standardize(inputs); } if (!string.IsNullOrEmpty(args.Split)) { if (inputs.shape.ndim > 1) { input_tensor = array_ops.squeeze(inputs, axis: new[] { -1 }); } if (args.Split == "whitespace") { input_tensor = tf.strings.split(input_tensor); } } return(input_tensor); }