MCPcopy Create free account
hub / github.com/chengsen/PyTorch_TextGCN / __init__

Method __init__

utils.py:51–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49
50class CudaUse(object):
51 def __init__(self):
52 self.cuda_available = th.cuda.is_available()
53 if self.cuda_available:
54 from fastai.utils.pynvml_gate import load_pynvml_env
55 self.pynvml = load_pynvml_env()
56
57 def get_cuda_id(self):
58 if self.cuda_available:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected