Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion ops/dataset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down