Giter Site home page Giter Site logo

Comments (2)

HantingChen avatar HantingChen commented on May 25, 2024

It seems that this problem is a pytorch issue when running on windows. You can reference: pytorch/pytorch#5858.

from efficient-computing.

QQ2737499951 avatar QQ2737499951 commented on May 25, 2024

It seems that this problem is a pytorch issue when running on windows. You can reference: pytorch/pytorch#5858.

==================
In Win10 environment, add the following code to solve the problem, thank you! In addition, you need to add a global acc_best。Thank you!

===============
if name == 'main':
main()

"D:\Program Files\Python368\python.exe" B:/PyTorch/DAFL/DAFL-train.py
[Epoch 0/200] [loss_oh: 0.323446] [loss_ie: -0.723433] [loss_a: -1.377360] [loss_kd: 1.624475]
Test Avg. Loss: 0.014621, Accuracy: 0.711200
acc 0.7112 acc_best 0
[Epoch 1/200] [loss_oh: 0.398816] [loss_ie: -0.994161] [loss_a: -1.477517] [loss_kd: 0.681656]
Test Avg. Loss: 0.011073, Accuracy: 0.795800
acc 0.7958 acc_best 0.7112
[Epoch 2/200] [loss_oh: 0.694914] [loss_ie: -0.942158] [loss_a: -1.655259] [loss_kd: 0.491626]
Test Avg. Loss: 0.014511, Accuracy: 0.767200
acc 0.7672 acc_best 0.7958
[Epoch 3/200] [loss_oh: 0.372430] [loss_ie: -0.973961] [loss_a: -1.844167] [loss_kd: 0.325282]
Test Avg. Loss: 0.008011, Accuracy: 0.849000
acc 0.849 acc_best 0.7958
[Epoch 4/200] [loss_oh: 0.338971] [loss_ie: -0.982305] [loss_a: -1.716944] [loss_kd: 0.316894]
Test Avg. Loss: 0.006166, Accuracy: 0.877000
acc 0.877 acc_best 0.849
[Epoch 5/200] [loss_oh: 0.322520] [loss_ie: -0.983168] [loss_a: -1.626730] [loss_kd: 0.278169]
Test Avg. Loss: 0.005701, Accuracy: 0.884200
acc 0.8842 acc_best 0.877
[Epoch 6/200] [loss_oh: 0.296399] [loss_ie: -0.980377] [loss_a: -1.993171] [loss_kd: 0.276820]
Test Avg. Loss: 0.005980, Accuracy: 0.880800
acc 0.8808 acc_best 0.8842
[Epoch 7/200] [loss_oh: 0.310579] [loss_ie: -0.989021] [loss_a: -1.786998] [loss_kd: 0.218293]
Test Avg. Loss: 0.004707, Accuracy: 0.903100
acc 0.9031 acc_best 0.8842
[Epoch 8/200] [loss_oh: 0.324671] [loss_ie: -0.970958] [loss_a: -1.733145] [loss_kd: 0.288907]
Test Avg. Loss: 0.005629, Accuracy: 0.881200
acc 0.8812 acc_best 0.9031
[Epoch 9/200] [loss_oh: 0.370372] [loss_ie: -0.934299] [loss_a: -1.562675] [loss_kd: 0.252697]
Test Avg. Loss: 0.018975, Accuracy: 0.697800
acc 0.6978 acc_best 0.9031
[Epoch 10/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031
[Epoch 11/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031
[Epoch 12/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031
[Epoch 13/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031
[Epoch 14/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031
[Epoch 15/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031
[Epoch 16/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031
[Epoch 17/200] [loss_oh: 1.752401] [loss_ie: -0.963753] [loss_a: -0.129881] [loss_kd: 0.000000]
Test Avg. Loss: 0.018973, Accuracy: 0.698000
acc 0.698 acc_best 0.9031

from efficient-computing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.