Open 00Sim opened 4 years ago
Hi @UberSim,
Sorry for the late reply!
The only changes (besides those that you already highlighted) that are required to make test-MSConv to work with the roadmap pre-trained weights are required in the definition of the structure of the network:
/* NETWORK STRUCTURE */
/* void add_layer(std::string layer_type, bool learning, bool load_weights, bool homeostasis, float Vth,
float decay, float alpha, float max_delay = 1.f, int num_delays = 1,
float synapse_inh_scaling = 0.f, int rf_side = 7, int out_channels = 8,
std::string padding = "none", float w_init = 0.5f); */
SNN->h_layers = (Layer **) malloc(sizeof(Layer*) * 5);
SNN->add_layer("Conv2d", false, true, true, 0.3f, 5.f, 0.1f, 1.f, 1, 0.f, 5, 16, "half");
SNN->add_layer("Merge", false, true, false, 0.000001f, 5.f, 1.f);
SNN->add_layer("Conv2d", false, true, true, 0.3f, 30.f, 0.1f, 25.f, 10, 0.5f, 5, 64, "half");
SNN->create_network(break_sim);
I just tested this code with your changes and it works. Note that you can vary the output activity that you get from each layer by varying the threshold of its neurons and the scaling factor of the inhibitory weights. Please let me know if you have any other question!
Thank you very much for using cuSNN and for highlighting those bugs, I will take care of them unless you want to contribute with a pull request!
Cheers, Fede
Hi Fede,
Thank you very much for the response! It seems like there may still be other errors in the modification I made as the MSConv spikes don't seem to be showing up. Thank you for testing the code with the changes, would be great to see the changes you made!
Thanks, Simin
Hello,
Thank you for the great work! I am trying to look at spike outputs from the cuSNN-samples roadmap data using what I believe are the parameters from the paper. The SSConv layer spikes work great and look like the paper results, but the MSConv layer's spikes are very very sparse (just a few spikes if any at all).
This was tested using the MSConv-test file and pretrained weights for roadmap data. Are these the correct parameters (from main.cpp)?
The original code is the same except for a few changes as I was getting compile errors:
1) Throughout plotter.cpp and data.cpp: Changed
SNN->cnt_layers
toSNN->h_cnt_layers[0]
2) Line 683: Changed
float value = this->SNN->h_layers[l]->h_kernels[kernel]->h_node_posttrace[node_index];
tofloat value = this->SNN->h_layers[l]->h_kernels[kernel]->h_node_train[node_index];
Thanks! Simin