CSI-Net
CSI-Net copied to clipboard
How to use the given fall data set to reproduce in the given code?
Hello, when I repeated the fall detection, I encountered the training and test accuracy of 0. Experiments performed with the solo_task_res_net.py file were used. The loss function and the calculation accuracy process are attached below.
loss:
criterion1 = nn.CrossEntropyLoss().cuda() lossC = criterion1(predict_label, labelsV[:, 0].type(torch.LongTensor).cuda())
acc:
for (samples, labels) in tqdm(train_data_loader):
samplesV = Variable(samples.cuda())
labelsV = Variable(labels.cuda())
predict_label = resnet(samplesV)
fall_stand_preds = predict_label[:, 0] # 取第一列
correct_t += fall_stand_preds.eq(labelsV[:, 0].data.long()).sum()
print("Training accuracy:", (100*float(correct_t)/num_train_instances))