Extract dense features

Can i extract features from dense layer in a theano model and feed them to pytorch model or vice versa.

You could run your Theano model and feed the output into your PyTorch model with torch.from_numpy(theano_output).
I assume this approach won’t be really fast and the Theano model won’t be trainable.
Depending on your use case, you also could transfer the weights from one to the other model and train it end to end.

Thanks, I will look into it.
Actually what I have is a CNN model in Theano/Lasagne, another CNN model in pytorch, after training both these seperately, I would take the fully connected (Dense layer) features from both CNN and feed into LSTM pytorch model.

If you don’t need it “on-the-fly”, e.g. for data augmentation, you could also save the features of both models to your disc and load it afterwards for the LSTM model.
Might keep the code a bit cleaner.