Convert tf.FusedBatchNorm into tfl primary math ops

* Added TF::FusedBatchNormOp
* Validated TF::FusedBatchNormOp's operands
* Added converter from tf.FusedBatchNorm to tfl math ops

In the converter, we additionally check that the 'is_training'
attribute in tf.FusedBatchNorm is false and the last 4 outputs
are all not used (true for inference). These requirements do
not exist in the original TOCO source code, which just silently
ignores the last 4 outputs.

PiperOrigin-RevId: 223027333
This commit is contained in:
Lei Zhang 2018-11-27 11:35:19 -08:00 committed by jpienaar
parent 759fd1c6a3
commit fce05646d7
1 changed files with 2 additions and 0 deletions

View File

@ -537,6 +537,8 @@ public:
template <typename ConcreteType>
class Impl : public TraitBase<ConcreteType, NResults<N>::Impl> {
public:
static unsigned getNumResults() { return N; }
const SSAValue *getResult(unsigned i) const {
return this->getOperation()->getResult(i);
}