So we want to have a random brain-like neuron mess. Meaning:
Something like ths (here AxB=5, K=4, CxD=2):
Operations that neurons shall do are weighted summ + some reduction like LeakyReLu.
So one can imagine that when connection randomnes is controlled so that connections are localised over image patches alike layers of CNN it can produce intresting results.
How one could do such thing (handle neurons one-by-one) in PyTorch?
There are two issues here: The major issue is how to randomly sample the connections, and a minor issue of how to optimize a sparse linear layer.
As for the minor issue, you can implement a sparse fully-connected layer based on the linked answer.
As for the random connectivity, you'll have to implement it in a way that there are no "loops"