LumenScopeAI
LumenScopeAI
# **STDP学习器step函数存在数值类型异常** - 在使用STDP学习器进行训练时,遇到了张量和None进行减法运算的异常,源码报错来自: `self.synapse.weight.grad = self.synapse.weight.grad - delta_w`,在以下完整代码中,`length = self.in_spike_monitor.records.__len__()`值为0,代表本轮并未接收到脉冲信号,即不会进入`for _ in range(length):`循环,此时`delta_w `恒为None,但`on_grad`且`self.synapse.weight.grad`不为None是,就会出现数据类型异常,张量在和None做减法。 ``` def step(self, on_grad: bool = True, scale: float = 1.): length = self.in_spike_monitor.records.__len__() delta_w...
Hello, I'm currently working with the `transformers` library to train a model on causal language modeling tasks using the `MambaForCausalLM` class. However, I've noticed that the typical approach to training...