Giter Site home page Giter Site logo

Comments (46)

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

感谢您的建议!
框架的Monitor部分提供了网络平均发放率的监测方式,可以参考相应的教程。而类似的能耗估算需要相关芯片的具体数据,如IBM TrueNorth、Intel Loihi、SpiNNaker等都有不同的能耗特性,这在部分文献中也有提到。

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

谢谢!

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

您好!我升级到了最新的版本spikingjelly==0.0.0.4,尝试使用教程中的monitor,但是在导入包的时候出现错误。
报错为No module named '_C_neuron'。没有这个_C_neuron的包,我查看本机python下“\Lib\site-packages\spikingjelly\cext”文件夹下只有四个.py文件,没有_C_neuron,也没有文件夹csrc

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

可参考 #46

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

谢谢!

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

谢谢!由于某些原因,我未能成功下载最新版的master压缩包。我本地电脑有去年12月份的master压缩包,我在spiking-master下执行命令“python setup.py install”,显示成功安装“spikingjelly==0.0.0.2”。但是运行程序时,依然存在“No module named '_C_neuron'”的错误。查看本地电脑\Lib\site-packages\下,也没有spikingjelly的文件夹。这是怎么回事呢?恳请指点一下,万分感谢!

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

目前已经成功下载最近版本的master压缩包,在相应目录下打算运行“python setup.py install”, Microsoft Visual C++ 14.0当时还未安装完成,安装完成后再试试

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

c_neuron是个共性的问题,稍后我们会更新相关代码和readme,届时会在此issue通知你。

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

可以试一下刚更新的代码,另外有GPU和CUDA的机器安装会容易一些

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

另外,由于某种原因,我这里无法使用git clone https://github.com/fangwei123456/spikingjelly.git这种方式安装。
我是将那个master包下载下来了,然后在命令行里运行的python setup.py install,应该效果是一样的吧?

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

对,应该是一样的

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

更新了readme。在没有CUDA的机器上安装,是不会编译CUDA扩展的。

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

安装报错,具体报错信息是什么?

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

image
这个是报错的开始,
image
这个是报错的末尾

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

image
这是我目前torch的版本

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

看一下环境变量的path中是否有类似的路径:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64
这个是cl.exe所在的目录

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

image
我的机器中有多个cl.exe文件,不太清楚放哪个进去可以。但都在bin文件夹下,所以我直接将bin文件夹放到环境变量中去。

image
这个是目前的报错情况,看来是要安装GCC。不过我目前的机器是Windows,是不是要解决这个问题还比较困难?

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

应该不需要GCC。建议试一下先用conda装一个pytorch的虚拟环境,然后在虚拟环境中尝试。conda中的pytorch比pip的好一些。windows下是可以编译CUDA扩展的,而且不需要GCC,我这样做是成功的。
如果你不需要CUDA扩展,可以直接用这个setup.py:
https://github.com/fangwei123456/spikingjelly/blob/c61ee0611899c32d59f32b15a9ea07a1516d9fa0/setup.py

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

conda环境下安装仍然失败的话,麻烦在此issue中回复一下报错的信息。

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

由于实验室网速慢+重新配置环境耗时较长(对我而言。。。)我使用本台机器中的虚拟机(环境为:Ubuntu+anaconda3+python3.8+pytorch1.7.1+cpu)可以正常使用“python setup.py install”
image

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

linux配环境确实比windows方便多了。windows下conda环境下安装的结果如何?

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

不怕大佬笑话,我当时Windows下装conda+pytorch+cuda+cudnn费了九牛二虎之力也没整明白,后来卸载了conda又花了很久安装仅仅安装python3.6.6+pytorch-gpu+cuda+cudnn。没敢把目前的环境给卸载,怕装不回去

from spikingjelly.

fangwei123456 avatar fangwei123456 commented on June 14, 2024

windows下装cuda和cudnn确实麻烦,那就先这样用吧

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

谢谢!
关于脉冲平均发放率的问题,为什么第2层就不行呢?明明第1层和第3层的平均发放率都是有的呀?
image

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

第二层是FC,不是神经元,发放率只对神经元层才有定义

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

啊!谢谢大佬指点!

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

你好!对于教程中的网络结构,脉冲平均发放数量是不是(784+100+10)*0.2655=237.357?
那么平均每秒大概发放多少次呢?就是最一开始的问题,如果这个模拟环境是真实硬件的话,每秒大概多少次脉冲该如何计算呢?

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

计算的是总能耗而非功率,因此一般只考虑发放的脉冲总数,发放间隔并不十分重要。可以参考DIET-SNN的计算方式。

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

image
你好,我想请教一下,当网络结构是这种的时候,module_name是什么呢?我尝试了1,2,3,4和static_conv、conv,好像都不太好使。
image

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

你好!DIET-SNN文章中的spikerate和教程中的平均发放率是同一回事嘛?我发现无论我怎么调整神经元的参数,步长的大小,都无法使平均发放率超过1,最多稳定在0.5左右(无论是IF还是LIF神经元)。而DIET-SNN文章表示它在VGG的类似结构中,发放率稳定在1.6,也就是整个训练过程中每个神经元平均发放1.6次。 所以,DIET-SNN文章中的spikerate和spikingjelly中的平均发放率不是同一回事吗?

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年3月30日(星期二) 下午4:58 收件人: @.>; 抄送: @.>; "State @.>; 主题: Re: [fangwei123456/spikingjelly] 有没有办法估算脉冲平均发放频率呢? (#59) 计算的是总能耗而非功率,因此一般只考虑发放的脉冲总数,发放间隔并不十分重要。可以参考DIET-SNN的计算方式。 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

现行文章中关于平均发放率实际上有两种不同的计算方式
#Spike / #Neuron
#Spike / (#Neuron * T)
SpikingJelly使用的是后者,因为前者更适合被称为Avg Spike Times

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

image
你好,我想请教一下,当网络结构是这种的时候,module_name是什么呢?我尝试了1,2,3,4和static_conv、conv,好像都不太好使。
image

关于模块命名,如文档所说请参见PyTorch的命名方式

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

现行文章中关于平均发放率实际上有两种不同的计算方式
#Spike / #Neuron
#Spike / (#Neuron * T)
SpikingJelly使用的是后者,因为前者更适合被称为Avg Spike Times。
关于这一段表述,其中的“T”是指训练过程中全部的推理时间,还是仅仅是训练步长呢(如下图中的T=8)?
image

from spikingjelly.

Yanqi-Chen avatar Yanqi-Chen commented on June 14, 2024

关于这一段表述,其中的“T”是指训练过程中全部的推理时间,还是仅仅是训练步长呢(如下图中的T=8)?

全部的推理时间指的是?对于单个神经元而言,T指的就是仿真步长。

from spikingjelly.

huatianxue1994 avatar huatianxue1994 commented on June 14, 2024

from spikingjelly.

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.