I have been studying the Rossmann notebook and watched the associated video several times, however I am slightly confused on how to make a change. The neural net and Random Forest models create predictions completely independent of each other as far as I can tell. What I am trying to do is train the neural network model, then drop the last layer that only outputs one number (in my code at least) and have the model output a vector of 500 (or whatever the previous linear layer outputs). I would like to train the random forest on these 500 features instead of the original train data. I imagine this shouldn’t be too complicated, but I have been googling for hours on this one. I tried using the hooks to simply get the values of the next to last linear layer in addition to the single output, but I can’t seem to get that to work either.
Thanks,
Bob