Giter Site home page Giter Site logo

NetX Dimension Seems Lost about lava-dl HOT 8 CLOSED

lava-nc avatar lava-nc commented on September 27, 2024
NetX Dimension Seems Lost

from lava-dl.

Comments (8)

bamsumit avatar bamsumit commented on September 27, 2024

@ahmetakman your network, as you defined in self.blocks, has two hidden layers and one output layer of dimensions 512, 512, and 10 respectively. So it does make sense to get the dimension of the network as 512, 512, and 10 when you load the network, isn't it?

from lava-dl.

ahmetakman avatar ahmetakman commented on September 27, 2024

I thought the dimension should be
Dense : Process_1 , shape : (34342,512)
Dense : Process_4 , shape : (512,512)
Dense : Process_7 , shape : (512,10)
As were in the NetX examples.

from lava-dl.

bamsumit avatar bamsumit commented on September 27, 2024

Look at the dense block definition in PilotNet SDNN training
image
and the shapes in PilotNet SDNN inference with NetX
image

from lava-dl.

ahmetakman avatar ahmetakman commented on September 27, 2024

I have mistaken the error about the dimensions I got when was connecting the processes. I will try again soon ,and write back. Thanks for the reply.

from lava-dl.

ahmetakman avatar ahmetakman commented on September 27, 2024

Let me come back to here,

First of all, I am not sure my environment is fully utilized but at some point I have a system with barely passing unit tests with hanging code block issue #55 .

Here my interpretation about NetX dimensions is still because of the current error I am getting. Let me summarize my goal then give the error.

I would like to run trained NMNIST model with lava core by using NetX network exchange. The result of the conversion is given above.

When I try to connect processes with the code block:

gt_logger = io.sink.RingBuffer(shape=(1,), buffer=num_steps)
output_logger = io.sink.RingBuffer(shape=net.out_layer.shape, buffer=num_steps)
dataloader.ground_truth.connect(gt_logger.a_in)
dataloader.s_out.connect(net.in_layer.neuron.a_in) ***** issue line ********
net.out_layer.out.connect(output_logger.a_in)

I get the error

AssertionError: Shapes torch.Size([2312]) and (512,) are incompatible.]()

First, my interpretation was the dimension was lost since it is 512 not 2312

from lava-dl.

bamsumit avatar bamsumit commented on September 27, 2024

Aren't you supposed to connect the dataloader.s_out to net.in_layer.synapse.s_in ? It seems you are bypassing the syanpse of the first layer!

dataloader.s_out.connect(net.in_layer.syanpse.s_in)

from lava-dl.

ahmetakman avatar ahmetakman commented on September 27, 2024

Yeah that was it, now I have connected processes the run config is running right now.

Thank you very much for the explanation. I sincerely thank for your patience.

I am actively learning the lava-ecosystem, SNNs ,and the new computers I am running them on.
Until I completely got the structure, I think it is natural to misunderstand some concepts.

I am closing the issue,
All the best,
Ahmet.

from lava-dl.

bamsumit avatar bamsumit commented on September 27, 2024

No problem @ahmetakman, happy to clarify any confusion.

from lava-dl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.