-
Notifications
You must be signed in to change notification settings - Fork 51
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
quantiztion and non-idealities factor #86
Comments
Hi @MySHworks, Thank you for reaching out! Could you please attach your simulation routines or minimal working examples so I can investigate further? The accuracy degradation observed will depend on what non-ideal characteristics you are introducing to your device model/peripheral circuitry, and the exact parameters in which you have used. If you could provide a specific error message for
These will enable me to better identify any specific issues that you may be encountering. Kind Regards, Corey. |
Hello, I have used the Memtorch library you released to simulate forward reasoning in networks with memristors, recently. I have to say it's a very handy library. However, one problem I have found in my patched use is that if the network is built using torch.nn.Sequential container, patched does not seem to change the associated Conv2d layer. As a result, the precision of patched_model remains unchanged no matter how the relevant parameters of patched_model are adjusted. |
Hi @MySHworks, Apologies for my late response! I have been focused on implementing support for comprehensive modeling of source and line resistance. I can confirm that your original issue was caused by using It appears that the patching procedures defined in memtorch.mn.Module.patch_model and memtorch.bh.nonideality.apply_nonidealities are currently incompatible with |
Hi @MySHworks, This fix has been merged to master in #88. I have tested it using
Could you please confirm that this works for your specific use-case? Thanks again for raising the issue! |
Thank you for providing such a simple solution to this problem. With your help, I have successfully solved the previous problem. Thank you again for your help. |
Hi @MySHworks, No problem at all! Looking at the most recent PyTorch documentation, it appears that both I have created a separate issue (#91) detailing this. I will update this thread once the issue has been fixed- my current intuition is to iterate through each element of each container and to check if any elements are containers recursively. |
Hello, I looked at your quantization code before when I was debugging, but I didn't find the real quantization part memtorch_binding.quantize(). May I ask where the code of this part is? I have encountered some problems in model quantification recently, and I really want to learn it. |
Hi @MySHworks, Methods defined in memtorch.bh.Quantize.py and Previous versions of MemTorch have used quantization routines from the pytorch-playground, which should be functionally equivalent to the above C++ routines. If you would like, in the next release, I can add backwards compatibility, so that both C++/CUDA bindings and Python routines are accessible for |
Hello, I would like to ask you some questions in the process of using memtorch.In the process of simulation of the finite conductivity state I found it didn't really quantify, the reason is that the "memtorch/bh/nonideality FiniteConductanceStates py" file try quantitative function of Max and min appeared error.Error: Expected Scalar type Float but found Double. |
Hello, while using the Memtorch library, I found a problem with the quantization operation in the FiniteConductanceStates file. Because the data type in the crossbar[i].conductance_matrix tensor is float64, the error "Expected Scalar type Float but found Double" will always occur in the quantification function section. However, if the conductance_matrix data type is changed to FLOAT32, an error occurs: "Segmentation fault (core DUMPED)". Do you have a good solution to this problem? I will be glad to hear from you. |
Hi @MySHworks, Apologies for the delayed response! I have looked into this further, and both issues should now be fixed in #110. |
Hi, I am still facing the problem of changing the state of finite conductance but accuracy remains the same, how do I use quantification correctly, thank you for your answer! @coreylammie @MySHworks |
Hello, I am a college student. I've been using the Memtorch you developed, recently. I have to say that this is a very good simulation library, which implements a lot of functions. It provides great convenience for the research of memristor - based network.
However, I encountered some problems in the process of using it. I hope you can give me some advice.
At First, The accuracy of the model didn't change when I added the non-idealities factor using apply_nonidealities.And the accuracy doesn't change much when you run the example you provided. May I ask what the reason is? In addition, when I was in use memtorch. Bh. Quantize.quantize function to quantify my model, it seems doesn't work.But my code is a one-to-one correspondence to the example.
The text was updated successfully, but these errors were encountered: