How to Create Shared Weights Layer in Keras
I'm trying to set up a CNN in Keras, and I don't have much experience outside of simple NNs as far as the actual setup. I understand how the CNN is going to work on my data, but I need advice on how to set it up in Keras.
In my dataset, each datapoint is structured as follows. There are n columns, each of which is sensor data of people performing an action. 856
There are 10 rows where each row is a single person's sensor data for that event. The label column is a score for how well they performed. Since each of their performances is related, each datapoint is a 10 by n matrix, and the label column for each data point is a 10 by 1 vector of scores.
Essentially, I want to set up my NN so that it treats:
Num|Sens0|Sens1|Sens2|Win
---|-----|-----|-----|---
A |data |data |data | 0
B |data |data |data | 0
C |data |data |data | 0
D |data |data |data | 0
E |data |data |data | 0
F |data |data |data | 0
G |data |data |data | 0
H |data |data |data | 1
I |data |data |data | 0
J |data |data |data | 0
the same as:
Num|Sens0|Sens1|Sens2|Win
---|-----|-----|-----|---
J |data |data |data | 0
F |data |data |data | 0
D |data |data |data | 0
B |data |data |data | 0
G |data |data |data | 0
H |data |data |data | 1
C |data |data |data | 0
A |data |data |data | 0
I |data |data |data | 0
E |data |data |data | 0
In my first layer (at the least), I want to set up convolutional neurons (I'm starting with 5, and moving on from there) so that each row shares weights amongst the observations, in such a way that the order I put the row in the datapoint doesn't matter (aside from it's correspondence with the label). Anyone know if this is possible? Otherwise I'll have to feed in each datapoint in all 10! orders, and I would prefer not to...
Any help is appreciated, thank you! 60