1

I am currently trying to implement the min-max relevance model from page 217 in this paper: https://reader.elsevier.com/reader/sd/pii/S0031320316303582?token=3C705E0F2F8518D919BAA293EC6ABA570F1CCB83ACB67C60419737F55BDFEC9013FA2FCF3ACC4CE1887E5387315E70E8

The problem is, that I need to train a bias, which is added to a layer and itself is given as a sum of weights*inputs + bias. The latter weights should be trained.

So, I have a neural network with one hidden layer. The bias for the hidden layer is constructed like an linear regression, just input and output layer. The bias gets its own input values. I guess I have to use the functional api, but how do I add the LR output as bias-term in the hidden layer?

Robin
  • 81
  • 5
  • "sum of weights*inputs + bias" is it same as Linear regression unit? If so simple `keras.layers.Dense(1)` may be helpfull. – Girish Hegde Aug 17 '20 at 16:50
  • I don't think this is what I mean @GirishDattatrayHegde. I just edited the question and hope that it is more clear what my problem is. – Robin Aug 18 '20 at 06:36

1 Answers1

0

Got it, just stack/concatenate the a layer for the bias with a layer for the neurons and then add them up with a non-trainable layer.

Robin
  • 81
  • 5