Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

neilisaac / torch   python

Repository URL to install this package:

Version: 1.8.0 

/ python / fakefp16_transform_lib.py

#!/usr/bin/env python3




import caffe2.python._import_c_extension as C
from caffe2.proto.caffe2_pb2 import NetDef

def fakeFp16FuseOps(net : NetDef) -> NetDef:
    net_str = net.SerializeToString()

    out_str = C.fakeFp16FuseOps(net_str)
    out_net = NetDef()
    out_net.ParseFromString(out_str)

    return out_net