diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-06-26 14:16:37 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-26 14:19:02 -0700 |
commit | 346611325add9da16d9a74b905228dc3068b30c1 (patch) | |
tree | 387c500172b0415edf64cd74c956b39ac3393a5c /tensorflow/contrib/lite/model.cc | |
parent | 1081683bf67f353dacc34c220c808a0080281f7f (diff) |
Un-fused quantized Babelfish LSTM cell support in TFLite
including support for shuffled-weights fully-connected op.
PiperOrigin-RevId: 202192299
Diffstat (limited to 'tensorflow/contrib/lite/model.cc')
-rw-r--r-- | tensorflow/contrib/lite/model.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/model.cc b/tensorflow/contrib/lite/model.cc index e1ec2d6d57..82f143b54d 100644 --- a/tensorflow/contrib/lite/model.cc +++ b/tensorflow/contrib/lite/model.cc @@ -444,6 +444,18 @@ TfLiteStatus ParseOpData(const Operator* op, BuiltinOperator op_type, op->builtin_options_as_FullyConnectedOptions()) { params->activation = parse_activation( fully_connected_params->fused_activation_function()); + switch (fully_connected_params->weights_format()) { + case FullyConnectedOptionsWeightsFormat_DEFAULT: + params->weights_format = kTfLiteFullyConnectedWeightsFormatDefault; + break; + case FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8: + params->weights_format = + kTfLiteFullyConnectedWeightsFormatShuffled4x16Int8; + break; + default: + error_reporter->Report("Unhandled fully-connected weights format."); + return kTfLiteError; + } } *builtin_data = reinterpret_cast<void*>(params); break; |