lava-nc / lava-dl

Deep Learning library for Lava

Home Page:https://lava-nc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Netx DelaySynapse Bug: Weight_exp is None

Michaeljurado42 opened this issue · comments

Describe the bug
weight_exp is not set in Delay Synapses in netx.

See here:
https://github.com/lava-nc/lava-dl/blob/main/src/lava/lib/dl/netx/blocks/process.py#L177

To reproduce current behavior
Steps to reproduce the behavior:

  1. When I run this code
from lava.lib.dl import netx

file_id = '1-FEHWht9DXsnEvt5IaUXWRru0awr4mtk'
url = f'https://drive.google.com/uc?id={file_id}&export=download'
local_filename = 'network.net'
# Function to download and save the file
def download_file(url, local_filename):
    response = requests.get(url)
    with open(local_filename, 'wb') as f:
        f.write(response.content)
    return local_filename
downloaded_file = download_file(url, local_filename)

# Load the network from the downloaded file
net = netx.hdf5.Network(downloaded_file)

print(net.layers[-2].synapse)
print(net.layers[-2].synapse.proc_params.get("weight_exp"))
  1. I get this output
<lava.proc.dense.process.DelayDense object at 0x0000015BA25205E0>
None

Expected behavior

<lava.proc.dense.process.DelayDense object at 0x0000015BA25205E0>
-3

For this particular model, the weight_exp is -3.

Additional context
Very small bug that luckily does not affect the Intel N-DNS challenge or the unit tests.