Closed Dipendra7 closed 7 months ago
Hi!
You just need to change spyx.axn.Axon()
to spyx.axn.arctan()
or any of the other surrogate activations. spyx.axn.Axon()
is deprecated and I missed this when updating the examples and docs.
Hi!
Thank you for prompt reply , It is working.
snn.LIF((64,), beta =0.8,activation=spyx.axn.arctan()),
Glad to hear it! I fixed the notebook on the docs as well to resolve this going forward.
I am experimenting cartpole with spiking neural network with spyx, but i got the following error. could you please assist?
AttributeError Traceback (most recent call last) in <cell line: 4>()
2 init_state = (jnp.zeros(64), jnp.zeros(2))
3 policy = hk.without_apply_rng(hk.transform(controller))
----> 4 policy_params = policy.init(rng=key, x=adapter(obs), state=init_state)
2 frames in controller(x, state)
7 core = hk.DeepRNN([
8 hk.Linear(64, with_bias=False),
----> 9 snn.LIF(64, beta=0.8, activation=spyx.axn.Axon()),
10 hk.Linear(2, with_bias=False),
11 snn.LI(2)
AttributeError: module 'spyx.axn' has no attribute 'Axon'