/usr/local/lib64/python3.6/site-packages/caffe2/python/test
NameSizeModeActions
__pycache__/-0755rm
blob_deallocation_test.py6320644editdlrm
do_op_test.py20550644editdlrm
executor_test.py30390644editdlrm
executor_test_util.py80580644editdlrm
fakefp16_transform_test.py7230644editdlrm
gpu_context_test.py11210644editdlrm
inference_lstm_op_test.py21900644editdlrm
python_protobuf_test.py6240644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/caffe2/python/test/fakefp16_transform_test.py (723B)
import unittest from caffe2.python.fakefp16_transform_lib import fakeFp16FuseOps from caffe2.python import core class Transformer(unittest.TestCase): def test_fuse(self): net_swish = core.Net("test_swish") net_swish_init = core.Net("test_swish_init") deq = core.CreateOperator("Int8DequantizeNNPI", ["Xq"], ["X"]) swish = core.CreateOperator("SwishFakeFp16NNPI", ["X"], ["Y"]) quant = core.CreateOperator("Int8QuantizeNNPI", ["Y"], ["Y_q"]) net_swish.Proto().op.extend( [ deq, swish, quant ] ) print(net_swish.Proto()) out_net = fakeFp16FuseOps(net_swish.Proto()) assert(len(out_net.op) == 1)