Open TjFish opened 8 months ago
Hi, after checking the figure of your terminal, I find the problem probably lies in the use of the dataset. We use cifar downloaded from the official website https://www.cs.toronto.edu/~kriz/cifar.html, and use timm.data.create_dataset
to load the dataset. Please check if this data loading way is used.
Here is my command and the inference result:
python inference.py -c configs/datasets/cifar10.yml --model vit_7_4_32 /opt/dataset/cifar-10 --model-checkpoint ./mpcvit_checkpoints/mpcvit_cifar10-0.5.pth.tar
Model vit_7_4_32 created, param count:3716902
Data processing configuration for current model + dataset:
input_size: (3, 32, 32)
interpolation: bicubic
mean: (0.4914, 0.4822, 0.4465)
std: (0.247, 0.2435, 0.2616)
crop_pct: 1.0
Loading Cifar-10/100 dataset...
Verifying the model with loaded wieghts...
Alpha list for attention heads:
layer 0: [1. 0. 0. 0.]
layer 1: [1. 1. 1. 1.]
layer 2: [1. 0. 1. 1.]
layer 3: [1. 1. 1. 1.]
layer 4: [0. 0. 1. 1.]
layer 5: [0. 0. 0. 0.]
layer 6: [0. 0. 0. 0.]
Test: [ 0/78] Time: 3.644 (3.644) Loss: 0.2900 (0.2900) Acc@1: 93.7500 (93.7500) Acc@5: 100.0000 (100.0000)
Test: [ 50/78] Time: 0.016 (0.092) Loss: 0.1699 (0.3381) Acc@1: 97.6562 (91.5288) Acc@5: 100.0000 (99.3873)
Test: [ 78/78] Time: 0.027 (0.066) Loss: 0.1019 (0.2851) Acc@1: 100.0000 (93.2200) Acc@5: 100.0000 (99.5700)
谢谢! 目前我看仓库里面只有明文上的训练和推断代码,大佬您是否有开源密文上执行推断的代码呢?| 感谢大佬!
谢谢! 目前我看仓库里面只有明文上的训练和推断代码,大佬您是否有开源密文上执行推断的代码呢?| 感谢大佬!
My pleasure :) This question was answered in the issue #5
在cifar10上使用checkpoints和Readme提供的命令测试时,准确率只有86%,请问这正常吗? 根据论文中给出的实验结果,准确率应该有93%左右 我没有改动代码,请问是什么地方需要配置吗