Skip to content

Commit

Permalink
fix multi-clip testing
Browse files Browse the repository at this point in the history
  • Loading branch information
yztongzhan committed Aug 8, 2022
1 parent e76333e commit 2254c5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engine_for_finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from mixup import Mixup
from timm.utils import accuracy, ModelEma
import utils
from scipy.special import softmax


def train_class_batch(model, samples, target, criterion):
Expand Down Expand Up @@ -245,6 +246,7 @@ def merge(eval_path, num_tasks):
chunk_nb = line.split(']')[1].split(' ')[2]
split_nb = line.split(']')[1].split(' ')[3]
data = np.fromstring(line.split('[')[1].split(']')[0], dtype=np.float, sep=',')
data = softmax(data)
if not name in dict_feats:
dict_feats[name] = []
dict_label[name] = 0
Expand Down

0 comments on commit 2254c5e

Please sign in to comment.