-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated readme and tutuorial links. Signed-off-by: bamsumit <bam_sumit@hotmail.com> * PilotNet verified in Netx * PiloteNet verified in NetX. Minor liniting fixes. Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Changes to accompany io read and reset api changes. Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Pilotnet SDNN tested Signed-off-by: bamsumit <bam_sumit@hotmail.com> * pilotnet sdnn tutorial Signed-off-by: bamsumit <bam_sumit@hotmail.com> * PilotNet SDNN notebook Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Removed dataset gt logging Signed-off-by: bamsumit <bam_sumit@hotmail.com> * fixed sdnn notebook plot label Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Integrated virtualport api to swicth from conv to dense layer Signed-off-by: bamsumit <bam_sumit@hotmail.com> * dense graded input support added. Cleaned up sdnn notebook Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Refport insconsistency in snn notebook Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Linting fixes. Updated build script Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Changed dates in copyright header Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Readme Updates and review comments fixes Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Fixed linting issue Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Cleaned up snn notebook. Fixed issue with lambda on Windows. Signed-off-by: bamsumit <bam_sumit@hotmail.com> * Fixed test_hdf5 tests to reflect in_layer transform changes Signed-off-by: bamsumit <bam_sumit@hotmail.com> * final tid bits Signed-off-by: bamsumit <bam_sumit@hotmail.com> Co-authored-by: Marcus G K Williams <marcus.williams@intel.com>
- Loading branch information
Showing
136 changed files
with
7,550 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ scipy | |
matplotlib | ||
ninja | ||
h5py >= 3.1.0 | ||
lava-nc@git+https://github.com/lava-nc/lava.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (C) 2022 Intel Corporation | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
from . import hdf5 | ||
from . import blocks | ||
|
||
__all__ = ['hdf5', 'blocks'] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright (C) 2022 Intel Corporation | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
import numpy as np | ||
|
||
from lava.magma.core.process.process import AbstractProcess | ||
from lava.magma.core.model.py.ports import PyInPort, PyOutPort | ||
from lava.magma.core.model.py.type import LavaPyType | ||
from lava.magma.core.decorator import implements, requires, tag | ||
from lava.magma.core.model.sub.model import AbstractSubProcessModel | ||
from lava.magma.core.sync.protocols.loihi_protocol import LoihiProtocol | ||
from lava.magma.core.resources import CPU | ||
|
||
from lava.lib.dl.netx.blocks.process import Input, Dense, Conv | ||
|
||
|
||
@requires(CPU) | ||
@tag('fixed_pt') | ||
class AbstractPyBlockModel(AbstractSubProcessModel): | ||
"""Abstract Block model. A block typically encapsulates at least a | ||
synapse and a neuron in a layer. It could also include recurrent | ||
connection as well as residual connection. A minimal example of a | ||
block is a feedforward layer.""" | ||
def __init__(self, proc: AbstractProcess) -> None: | ||
if proc.has_graded_input: | ||
self.inp: PyInPort = LavaPyType(np.ndarray, np.int32, precision=32) | ||
else: | ||
self.inp: PyInPort = LavaPyType(np.ndarray, np.int8, precision=1) | ||
|
||
if proc.has_graded_output: | ||
self.out: PyOutPort = LavaPyType(np.ndarray, np.int32, precision=32) | ||
else: | ||
self.out: PyOutPort = LavaPyType(np.ndarray, np.int8, precision=1) | ||
|
||
|
||
@implements(proc=Input, protocol=LoihiProtocol) | ||
class PyInputModel(AbstractPyBlockModel): | ||
def __init__(self, proc: AbstractProcess) -> None: | ||
super().__init__(proc) | ||
|
||
|
||
@implements(proc=Dense, protocol=LoihiProtocol) | ||
class PyDenseModel(AbstractPyBlockModel): | ||
def __init__(self, proc: AbstractProcess) -> None: | ||
super().__init__(proc) | ||
|
||
|
||
@implements(proc=Conv, protocol=LoihiProtocol) | ||
class PyConvModel(AbstractPyBlockModel): | ||
def __init__(self, proc: AbstractProcess) -> None: | ||
super().__init__(proc) |
Oops, something went wrong.