You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use GRID_FOUR or GRID_EIGHT type connectivity, one needs to restrict to a perfect square number of (pcnn at least) oscillators.
This restrics the scope of the library(at least pcnn, which I am using) to (cropped) square images.
Here's the relevant code block from network.cpp:
void network::create_grid_four_connections() {
const double conv_side_size = std::sqrt((double) num_osc);
if (conv_side_size - std::floor(conv_side_size) > 0) {
throw std::runtime_error("Invalid number of oscillators in the network for the grid structure");
}
And of course, making type GRID_EIGHT calls the previous method only. code block
The feeding and linking weight "matrix" in pcnn (haven't checked out other networks) is defined just as a single integer. Hence one can only have an array of equal weights.
This should be improved to allow users to define custom linkages like gaussian, or inverse of distance.
[code block 1](https://github.com/annoviko/pyclustering/blob/master/ccore/ccore/pcnn.h#L34 -L35)
typedef struct pcnn_parameters {
...
double W = 1.0;
double M = 1.0;
madratman
changed the title
A modified PCNN (adding methods to pcnn.cpp)
Adding support for (1) rectangular images and (2) user-defined linking and feeding weight matrices
Oct 23, 2015
(Maybe this should be broken into two issues)
GRID_FOUR
orGRID_EIGHT
type connectivity, one needs to restrict to a perfect square number of (pcnn at least) oscillators.This restrics the scope of the library(at least pcnn, which I am using) to (cropped) square images.
Here's the relevant code block from network.cpp:
And of course, making type
GRID_EIGHT
calls the previous method only. code blockThis should be improved to allow users to define custom linkages like gaussian, or inverse of distance.
[code block 1](https://github.com/annoviko/pyclustering/blob/master/ccore/ccore/pcnn.h#L34 -L35)
code block 2
The text was updated successfully, but these errors were encountered: