Skip to content

Commit

Permalink
some loggings added
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahraeian committed Feb 28, 2019
1 parent 46e7722 commit e77c242
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions neusomatic/python/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,11 @@ def call_neusomatic(candidates_tsv, ref_file, out_dir, checkpoint, num_threads,
num_channels = 119 if ensemble else 26
net = NeuSomaticNet(num_channels)
if use_cuda:
logger.info("GPU calling!")
net.cuda()
else:
logger.info("CPU calling!")


if torch.cuda.device_count() > 1:
logger.info("We use {} GPUs!".format(torch.cuda.device_count()))
Expand Down
3 changes: 3 additions & 0 deletions neusomatic/python/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ def train_neusomatic(candidates_tsv, validation_candidates_tsv, out_dir, checkpo
num_channels = 119 if ensemble else 26
net = NeuSomaticNet(num_channels)
if use_cuda:
logger.info("GPU training!")
net.cuda()
else:
logger.info("CPU training!")

if torch.cuda.device_count() > 1:
logger.info("We use {} GPUs!".format(torch.cuda.device_count()))
Expand Down

0 comments on commit e77c242

Please sign in to comment.