neuron_builders.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:nengo_dl 作者: nengo 项目源码 文件源码
def build_step(self, signals):
        j = signals.gather(self.J_data)
        j -= self.one

        # note: we convert all the j to be positive before this calculation
        # (even though we'll only use the values that are already positive),
        # otherwise we can end up with nans in the gradient
        rates = self.amplitude / (
            self.tau_ref + self.tau_rc * tf.log1p(tf.reciprocal(
                tf.maximum(j, self.epsilon))))

        signals.scatter(self.output_data, tf.where(j > self.zero, rates,
                                                   self.zeros))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号