gtnet.utils module

gtnet.utils.parse_logger(string)
gtnet.utils.get_logger()
class gtnet.utils.DeployPkg

Bases: object

A class to handle loading and manipulating the deployment package

classmethod check_pkg()
path(path)

Map paths to be relative to current working directory

property manifest
__getitem__(key)
gtnet.utils.load_deploy_pkg(for_predict=False, for_filter=False, contigs=False)
class gtnet.utils.GPUModel(model, device)

Bases: Module

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(x)

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool
gtnet.utils.check_cuda(parser)
gtnet.utils.check_device(args)
gtnet.utils.write_csv(output, args)