Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance of DeepSVDD in cifar10 #11

Open
HelloSeeing opened this issue Jun 16, 2019 · 10 comments
Open

Performance of DeepSVDD in cifar10 #11

HelloSeeing opened this issue Jun 16, 2019 · 10 comments

Comments

@HelloSeeing
Copy link

HelloSeeing commented Jun 16, 2019

Hi,

Thanks for sharing your source code! I clone this repository and run the experiment of cifar10 with digit 6 as the known class samples by the following command:

python main.py \
    cifar10 \
    cifar10_LeNet \
    ../log/cifar10_test \
    ../data \
    --objective one-class \
    --lr 0.0001 \
    --n_epochs 150 \
    --lr_milestone 50 \
    --batch_size 200 \
    --weight_decay 0.5e-6 \
    --pretrain True \
    --ae_lr 0.0001 \
    --ae_n_epochs 350 \
    --ae_lr_milestone 250 \
    --ae_batch_size 200 \
    --ae_weight_decay 0.5e-6 \
    --normal_class 7

However, the result is:

INFO:root:Training time: 183.387
INFO:root:Finished training.
INFO:root:Starting testing...
INFO:root:Testing time: 1.911
INFO:root:Test set AUC: 60.59%
INFO:root:Finished testing.

Could you please help me with this?

@coderKyf
Copy link

coderKyf commented Aug 7, 2019

@HelloSeeing
Hi,
When I run this code ,some errors occurred.

python main.py cifar10 cifar10_LeNet ../log/cifar10_test ../data --objective one-class --lr 0.0001 --n_epochs 150 --lr_milestone 50 --batch_size 200 --weight_decay 0.5e-6 --pretrain True --ae_lr 0.0001 --ae_n_epochs 350 --ae_lr_milestone 250 --ae_batch_size 200 --ae_weight_decay 0.5e-6 --normal_class 7 INFO:root:Log file is ../log/cifar10_test/log.txt. INFO:root:Data path is ../data. INFO:root:Export path is ../log/cifar10_test. INFO:root:Dataset: cifar10 INFO:root:Normal class: 7 INFO:root:Network: cifar10_LeNet INFO:root:Deep SVDD objective: one-class INFO:root:Nu-paramerter: 0.10 INFO:root:Computation device: cpu INFO:root:Number of dataloader workers: 0 Files already downloaded and verified Traceback (most recent call last): File "main.py", line 192, in <module> main() File "E:\anaconda\envs\CenterNet\lib\site-packages\click\core.py", line 764, in __call__ return self.main(*args, **kwargs) File "E:\anaconda\envs\CenterNet\lib\site-packages\click\core.py", line 717, in main rv = self.invoke(ctx) File "E:\anaconda\envs\CenterNet\lib\site-packages\click\core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "E:\anaconda\envs\CenterNet\lib\site-packages\click\core.py", line 555, in invoke return callback(*args, **kwargs) File "main.py", line 114, in main dataset = load_dataset(dataset_name, data_path, normal_class) File "D:\Deep-SVDD\src\datasets\main.py", line 17, in load_dataset dataset = CIFAR10_Dataset(root=data_path, normal_class=normal_class) File "D:\Deep-SVDD\src\datasets\cifar10.py", line 43, in __init__ train_idx_normal = get_target_label_idx(train_set.train_labels, self.normal_classes) AttributeError: 'MyCIFAR10' object has no attribute 'train_labels'

Can you help me? Thanks a lot!

@HelloSeeing
Copy link
Author

@coderKyf Did you run your code under the virtual environment provided?

@coderKyf
Copy link

coderKyf commented Aug 7, 2019

@HelloSeeing Yes, I had run this code in mnist successfully.

@HelloSeeing
Copy link
Author

@coderKyf I think you could check the version of your installed torchvision is 0.2.1 or not. In addition, I think you should check all versions of packages listed in requirements.txt

@coderKyf
Copy link

coderKyf commented Aug 7, 2019

@HelloSeeing Thanks a lot. Torchvision is not 0.2.1. Thanks.

@HelloSeeing
Copy link
Author

@coderKyf Could you please share me with results of your experiments on cifar10? Thanks!

@coderKyf
Copy link

coderKyf commented Aug 9, 2019

@HelloSeeing
From class 0 to 9 are
59.51%
61.12%
62.05%
58.73%
56.57%
61.57%
57.20%
62.60%
76.44%
68.45%

Maybe it would be better to change the hyperparameters.

@HelloSeeing
Copy link
Author

@coderKyf Thanks!

@TabGuigui
Copy link

@coderKyf
Hello, is each normal class result under the same hyperparameter or adjust some when change the normal class?

@crazyn2
Copy link

crazyn2 commented Apr 14, 2023

@HelloSeeing From class 0 to 9 are 59.51% 61.12% 62.05% 58.73% 56.57% 61.57% 57.20% 62.60% 76.44% 68.45%

Maybe it would be better to change the hyperparameters.

i didnt think so. the average AUC ROC i got was 61.8% of one class and 60.8% of soft boundary. maybe its unable to get the same data of paper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants