In LSTM code, I notice that 'To run the LSTM code, first extract the features using the TSN trained models'
Actually, I can't understand how to use this code. Can you provide some details or some h5/pkl files mentiond below?
def read_data(data_dir):
if osp.exists(args.data_dir + '_val_feats.h5'):
print('This looks like TSN outputs, reading it so.')
val_data = read_data_tsn(args.data_dir + '_val_feats.h5')
train_data = read_data_tsn(args.data_dir + '_train_feats.h5')
elif osp.exists(osp.join(
args.data_dir, 'results_probs_test_fullLbl.pkl')):
print('This looks like NL outputs, reading it so.')
assert args.lbl_dir is not None, (
'lbl_dir must be set for NL models, since the labels are not '
'stored in the PKL file.')
val_data = read_data_nl(
osp.join(args.data_dir, 'results_probs_test_fullLbl.pkl'),
osp.join(args.lbl_dir, 'val.txt'))
train_data = read_data_nl(
osp.join(args.data_dir, 'results_probs_train_fullLbl.pkl'),
osp.join(args.lbl_dir, 'train.txt'))
else:
raise NotImplementedError('Dunno how to read data directory {}'.format(
data_dir))
return train_data, val_data
In LSTM code, I notice that 'To run the LSTM code, first extract the features using the TSN trained models' Actually, I can't understand how to use this code. Can you provide some details or some h5/pkl files mentiond below?
Thanks!