Code Monkey home page Code Monkey logo

lwf's People

Contributors

ngailapdi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lwf's Issues

MemoryError!

I encounter the numpy memory error while trying to run the code.
My environment:
py3.10 , Torch 1.12.0 , numpy 1.26.1
I have 32GB memory,but the runnning process takes all of it.

Traceback (most recent call last):
File "D:\WORK\FaultDetection\LWF-master\main.py", line 37, in
all_train = cifar10(root='./data',
File "D:\WORK\FaultDetection\LWF-master\data_loader.py", line 45, in init
train_data.append(curr_img/255.)
numpy.core._exceptions.MemoryError: Unable to allocate 1.15 MiB for an array with shape (3, 224, 224) and data type float64

I tried to modify the data type of "curr_img" to float32, but the process failed.

Traceback (most recent call last):
File "D:\WORK\FaultDetection\LWF-master\main.py", line 37, in
all_train = cifar10(root='./data',
File "D:\WORK\FaultDetection\LWF-master\data_loader.py", line 51, in init
self.train_data = np.array(train_data, dtype = np.float32)
numpy.core._exceptions.MemoryError: Unable to allocate 28.0 GiB for an array with shape (50000, 3, 224, 224) and data type float32

What should I do to fix the problem?Should I change my Pytorch and Python to lower versions?

About the loss

Thank you very much for your project, which has helped me a lot. But I have some questions about the definition of loss. line 152

Why do I need to recopy the original model and forward it. May I directly copy the value of logits of line 149. Or, what are the advantages or disadvantages of doing this?

Maybe I have overlooked some parts of the paper and hope to get your help. Any suggestions may be of great help to me, thank you very much!

Can you show me where you freeze the model?

In the paper, they said that first they freeze shared and old parameters and train new parameters only. After that, they do joint-training.

But in your code I dont see freezing step.

Thank you.

A question in other dataset

Thanks for sharing. But when I implemented the method on my local dataset, the behaviour of the model is not ideal. It feels like that it didn't have any improvement. I'd appreciate it if you could give me some suggestions!

打扰了

请问您的程序是从一百个类分成50个任务吗,每次任务两类?还是怎样?我想把这一百类分成十个任务,做增量学习,您有什么建议吗?

请问找不到数据集,该怎么办

Traceback (most recent call last):
File "C:/Users/Lenovo/Desktop/Learning-without-Forgetting-using-Pytorch-main/main.py", line 70, in
transform=train_transforms,
File "C:\Users\Lenovo\Desktop\Learning-without-Forgetting-using-Pytorch-main\dataset.py", line 16, in init
with open(os.path.join(self.root, 'images.txt')) as f:
FileNotFoundError: [Errno 2] No such file or directory: '~/CUB_200_2011\images.txt'

Excuse me, what should I do with this problem

fatal: Not a valid object name HEAD
Traceback (most recent call last):
File "C:/Users/Lenovo/Desktop/代码-zy/LWF/6LWF-master/main.py", line 171, in
githash = subprocess.check_output(['git', 'describe', '--always'])
File "D:\Programs\Python\Python36\lib\subprocess.py", line 356, in check_output
**kwargs).stdout
File "D:\Programs\Python\Python36\lib\subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'describe', '--always']' returned non-zero exit status 128.

Excuse me, what should I do with this problem

The implementation of MultiClassCrossEntropy seems incorrect

Hi, thanks a lot for sharing this implementation. But I found the implementation of MultiClassCrossEntropy confusing. The things are two-fold:

  1. The computation of the output and labels. In the original paper of LwF, the (1/T) is on the power instead of being as a multiplicative factor
  2. In the 'return Variable(outputs.data, requires_grad=True).cuda()' line, this new Variable losses the computaion for computing output and optimizing this output will not updatet the model. As a result, the dist_loss in line 155 of model.py does not affect the results and the performance is same after removing this term.

Apologize if there is any mistake in my understanding, and thanks again for sharing the implementation!

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.