From fc447958cdbfdc8909cf4742ac4a6174935b2fec Mon Sep 17 00:00:00 2001 From: aravind Date: Fri, 3 Jul 2020 09:57:14 +0530 Subject: [PATCH] a few useful comments are added --- main.py | 4 +++- ops/dataset_config.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 595b4d68..8b423d14 100755 --- a/main.py +++ b/main.py @@ -244,7 +244,8 @@ def train(train_loader, model, criterion, optimizer, epoch, log, tf_writer): output = model(input_var) loss = criterion(output, target_var) - # measure accuracy and record loss + # measure accuracy and record loss + #if you have only 2 classes change the 5 to 2 the second argumnet is no of classes prec1, prec5 = accuracy(output.data, target, topk=(1, 5)) losses.update(loss.item(), input.size(0)) top1.update(prec1.item(), input.size(0)) @@ -301,6 +302,7 @@ def validate(val_loader, model, criterion, epoch, log=None, tf_writer=None): loss = criterion(output, target) # measure accuracy and record loss + #if you have only 2 classes change the 5 to 2 the second argumnet is no of classes prec1, prec5 = accuracy(output.data, target, topk=(1, 5)) losses.update(loss.item(), input.size(0)) diff --git a/ops/dataset_config.py b/ops/dataset_config.py index e45cd9ea..525a4a62 100755 --- a/ops/dataset_config.py +++ b/ops/dataset_config.py @@ -90,7 +90,7 @@ def return_jester(modality): def return_kinetics(modality): - filename_categories = 400 + filename_categories = #path to 'kinetics_label_map.txt' if modality == 'RGB': root_data = ROOT_DATASET + 'kinetics/images' filename_imglist_train = 'kinetics/labels/train_videofolder.txt'