aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/toco/tooling_util.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-23 11:42:02 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-23 11:46:57 -0700
commitd93e09fbd3408f6ee1647addfdca1eef00139223 (patch)
tree9b60cb04e941a357dfce604df72d777ed6452427 /tensorflow/contrib/lite/toco/tooling_util.cc
parentf0d5d2047833c7221ce3be1690689ca1c6658add (diff)
Add fast shuffled fully-connected path also for the case where the
RHS has 4 columns (so far was only for the GEMV case where RHS has 1 column). Also pre-shuffle / pre-xor the input activations, not just the weights. We need a buffer for that, so the shuffled FullyConnected operator gets a second output acting as its workspace, similar to what we have been doing for Conv operators needed a im2col workspace buffer. PiperOrigin-RevId: 193958461
Diffstat (limited to 'tensorflow/contrib/lite/toco/tooling_util.cc')
-rw-r--r--tensorflow/contrib/lite/toco/tooling_util.cc15
1 files changed, 1 insertions, 14 deletions
diff --git a/tensorflow/contrib/lite/toco/tooling_util.cc b/tensorflow/contrib/lite/toco/tooling_util.cc
index cf2cbeedc7..5a341294db 100644
--- a/tensorflow/contrib/lite/toco/tooling_util.cc
+++ b/tensorflow/contrib/lite/toco/tooling_util.cc
@@ -1405,20 +1405,7 @@ void ResolveModelFlags(const ModelFlags& model_flags, Model* model) {
}
input_minmax.min = (qmin - mean_value) / std_value;
input_minmax.max = (qmax - mean_value) / std_value;
- if (input_array.minmax) {
- if (input_array_proto.has_mean_value() ||
- input_array_proto.has_std_value()) {
- const double width = input_minmax.max - input_minmax.min;
- const double kMinMaxAllowedDiff = 1e-6 * width;
- CHECK(std::abs(input_minmax.min - input_array.minmax->min) <
- kMinMaxAllowedDiff &&
- std::abs(input_minmax.max - input_array.minmax->max) <
- kMinMaxAllowedDiff)
- << input_minmax.min << ", " << input_minmax.max
- << " != " << input_array.minmax->min << ", "
- << input_array.minmax->max;
- }
- } else {
+ if (!input_array.minmax) {
input_array.GetOrCreateMinMax() = input_minmax;
}
}