Comments (5)
You can write a function which make a traversal in your model to set initial membrane potential. For example:
def set_initial(model, value):
for module in model.modules():
if isinstance(module, neuron):
module.v = value
from spikingjelly.
You can write a function which make a traversal in your model to set initial membrane potential. For example:
def set_initial(model, value): for module in model.modules(): if isinstance(module, neuron): module.v = value
Thanks, this is close to what I was looking for! But I was wondering if it would be possible to have the initial value being a parameter to learn
from spikingjelly.
You can write a function which make a traversal in your model to set initial membrane potential. For example:
def set_initial(model, value):
for module in model.modules():
if isinstance(module, neuron):
module.v = value
Thanks, this is close to what I was looking for! But I was wondering if it would be possible to have the initial value being a parameter to learn
Then you need to use nn.parameter to represent the initial value.
from spikingjelly.
Yes exactly, I think I need a parameter v_init
that by default is set to 0.0
. Where is the right place to add this parameter. I usually subclass the base neuron to add these kind of changes, but I struggle to find the right way to add this parameter in there.
from spikingjelly.
Yes exactly, I think I need a parameter
v_init
that by default is set to0.0
. Where is the right place to add this parameter. I usually subclass the base neuron to add these kind of changes, but I struggle to find the right way to add this parameter in there.
Just like this:
class Neuron():
def __init__(self):
self.init_v = nn.parameter([1])
Note that this code is only a draft for illustration. And you should also write a new reset function to set v to be equal with v_init after a timestep.
from spikingjelly.
Related Issues (20)
- A problem with RAM. DSQN.
- 生成模型
- The CIFAR10DVS dataset could not be downloaded, prompting HTTPError: HTTPError 403: Forbidden
- 运行DSQN项目时报错(neuron.py_830行_neuronal_charge()函数变量_tensor类型不匹配) HOT 4
- 固定时间间隔积分有问题
- AdaptiveAvgPool1d与BatchNorm1在多步传播模式下报错 HOT 1
- 使用spikingvgg11识别cifar10的时候,adaptive_avg_pool2d_backward_cuda报错
- 运行文档 “降低内存占用” 部分未成功
- conv_fashion_mnist.py 在Cuda:0 下不能运行,设置-device cpu 才能运行
- How to solve a regression problem HOT 1
- Problem with the evaluation mode
- 有哪些结构不能转成SNN吗? HOT 1
- STDP + Recurrent container
- Dynamic Threshold HOT 1
- 请问有没有专门处理长度可变序列的脉冲神经网络呀 HOT 1
- 关于类型注解和支持的Python版本 about type hint and support version of Python HOT 4
- STDPLearner never frees the created tensors even when out of scope, causing torch.OutOfMemoryError HOT 2
- 惊蛰框架为什么在训练过程中会产生报错,是否可以提供调试的解决思路? HOT 2
- 引入惊蛰框架后会导致自己的logging模块失效 HOT 2
- SNN参数量和运算代价计算
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spikingjelly.