Add destructor to torch_neural_net for #194
This commit is contained in:
parent
4d0280557c
commit
0b6b22313e
|
@ -68,6 +68,10 @@ class TorchNeuralNet:
|
|||
self.p.kill()
|
||||
atexit.register(exitHandler)
|
||||
|
||||
def __del__(self):
|
||||
if self.p.poll() is None:
|
||||
self.p.kill()
|
||||
|
||||
def forwardPath(self, imgPath):
|
||||
"""
|
||||
Perform a forward network pass of an image on disk.
|
||||
|
|
Loading…
Reference in New Issue