Comments (13)
Yes, that should be possible. If you want to propagate the change of the added site further down the network, you also need to update the active_sites_map.
from rpg_asynet.
i think i should make some change input_locations and output_locations. am i right?
actually, i am confused with the code from line 151-181.
from rpg_asynet.
i find that the input_locations and output_locations are one-to-one, shouldn't it be related with filter_size?
from rpg_asynet.
A rule in the rule book specifies the connection between neurons i.e. input and output location. Thus, it is always one-to-one. An input site is usually connected to multiple output site, therefore mutliple rules can contain the same input site.
The python code is implemented to achieve as much as possible in matrix form. Maybe it is easier to read the cpp code:
https://github.com/uzh-rpg/rpg_asynet/blob/master/async_sparse_py/src/conv2d.cpp
from rpg_asynet.
i think if i wanna adding rules i should change active_sites_to_update, but how can i know whether the rules is rightful?
for example, if i use active_sites_to_update.append([3, 3])
it doesn't report any error, but if i use active_sites_to_update.append([0, 3])
, it shows a traceback:
Traceback (most recent call last):
File "test.py", line 91, in
asyn_output = asyn_model.forward(x_asyn)
File "/storage/rpg_asynet-master/models/asyn_sparse_vgg.py", line 49, in forward
rule_book_output=None)
File "/storage/rpg_asynet-master/layers/conv_layer_2D.py", line 123, in forward
output_feature_map.index_add_(dim=0, index=flattend_indices, source=update_term)
IndexError: index out of range in self
from rpg_asynet.
active_sites_to_update just relates to the current update_location. It is not the right place to add new rules
I am not quite sure what your goal is. What do you do if the new rule connects to an inactive output site?
In general, you can append new rules directly to the rulebook in https://github.com/uzh-rpg/rpg_asynet/blob/master/layers/conv_layer_2D.py#L178
But you need to be sure how to update the active site map.
from rpg_asynet.
I want to see if adding rules can improves performance of asynet. i also want to use a if block to handle the inactive case.
i find that the size of rule_book_output and rule_book_input is equal, does it mean i should update these two variables at the same time?
from rpg_asynet.
Yes, the rule book defines for each kernel index the input and output sites. So there is a one to one mapping between rule_book_input to rule_book_output. So you need to update both books to add a new rule
from rpg_asynet.
can i just append output_locations[i_active_site]+1 to achieve my goal?
or i should consider about position_kernels and output_locations
from rpg_asynet.
You should consider all of the three and additionally also the active sites map.
Moreover, if you want to extend the rules based on your image, you also need to increase the kernel size.
from rpg_asynet.
ok, thanks for your reply~
from rpg_asynet.
what does the variable active_sites_to_update conclude?
i find that this variable is related to rule_book_output and rule_book_inout, more specifically, active_sites_to_update[:, 0] is related to rule_book_inout and active_sites_to_update[:, 1] is related to rule_book_output.
when i append a new site to active_sites_to_update, the program showed the error below.
File "asyn_model_test.py", line 120, in <module>
asyn_output = asyn_model.forward(x_asyn)
File "/storage/rpg_asynet-master/models/asyn_sparse_vgg.py", line 49, in forward
rule_book_output=None)
File "/storage/rpg_asynet-master/layers/conv_layer_2D.py", line 123, in forward
output_feature_map.index_add_(dim=0, index=flattend_indices, source=update_term)
IndexError: index out of range in self
from rpg_asynet.
The variable active_sites_to_update includes the relative kernel indices of the active sides in the receptive field of the sites stored in update_location, which have at least one active site in the receptive field. So it is coupled to update_location variable, which is given as input to the function.
As I said before, active_sites_to_update is not the right place to append new rules. Add the rules directly to the rulebook in https://github.com/uzh-rpg/rpg_asynet/blob/master/layers/conv_layer_2D.py#L178
from rpg_asynet.
Related Issues (20)
- where does the accuracy come from? HOT 11
- how can we make asynet trainable? HOT 3
- an error when training with gpu HOT 3
- Some question about code on reading N-Cars dataset HOT 6
- Training times
- Help with using asynet for object detection HOT 5
- Bug HOT 1
- Error while running Object Detection HOT 4
- Error compiling async_sparse_py HOT 3
- Questions about Prophesee dataset
- Help of running time HOT 1
- How to compute FLOPs HOT 1
- Codes relevant to Prophesse dataset experiments?
- Unable to make dataset for N-Cars HOT 1
- Failed to run "pip install async_sparse_py/" HOT 1
- I want to use DVS128 dataset, what should I do?
- How to use the model to detect?
- Histogram representation updating asynchronously?
- How to preprocess DVSGesture
- Check for a broken link: git clone https://gitlab.com/libeigen/eigen.git --branch 3.4.0-rc1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpg_asynet.