license describe ( 'kernel2op metadata file' , ( ) => { it ( 'has kernel2op.json' , ( ) => { expect ( ( ) => { require ( 'tfjs-converter/metadata/kernel2op.json' ) ; } ) . not . toThrow ( ) ; } ) ; it ( 'only known unmapped kernel are unmmapped' , ( ) => { const knownUnmappedKernels = [ 'Const' , 'EmptyTensorList' , 'Enter' , 'Exit' , 'FakeQuantWithMinMaxVars' , 'Identity' , 'IdentityN' , 'If' , 'LoopCond' , 'Merge' , 'NextIteration' , 'Placeholder' , 'PlaceholderWithDefault' , 'Print' , 'Snapshot' , 'StatelessIf' , 'StatelessWhile' , 'StopGradient' , 'Switch' , 'TensorArrayCloseV3' , 'TensorArrayConcatV3' , 'TensorArrayGatherV3' , 'TensorArrayReadV3' , 'TensorArrayScatterV3' , 'TensorArraySizeV3' , 'TensorArraySplitV3' , 'TensorArrayV3' , 'TensorArrayWriteV3' , 'TensorListConcat' , 'TensorListFromTensor' , 'TensorListGather' , 'TensorListGetItem' , 'TensorListPopBack' , 'TensorListPushBack' , 'TensorListReserve' , 'TensorListScatter' , 'TensorListScatterV2' , 'TensorListSetItem' , 'TensorListSplit' , 'TensorListStack' , 'While' , 'HashTable' , 'HashTableV2' , 'LookupTableImport' , 'LookupTableImportV2' , 'LookupTableFind' , 'LookupTableFindV2' , 'LookupTableSize' , 'LookupTableSizeV2' ] ; const kernel2op = require ( 'tfjs-converter/metadata/kernel2op.json' ) ; const kernels = Object . keys ( kernel2op ) ; for ( const kernelName of kernels ) { const tfOps = kernel2op [ kernelName ] ; if ( knownUnmappedKernels . includes ( kernelName ) ) { expect ( tfOps . length ) . toEqual ( 0 , `Kernel "${ kernelName }" is expected to be unmapped but
              instead maps to ${ tfOps }` ) ; } else { expect ( tfOps . length ) . toBeGreaterThan ( 0 , `Kernel ${ kernelName } is expected to be mapped to a list
                of tf ops` ) ; } } } ) ; } ) ;