Question / Feature Request
Is there a supported way to extract feature embeddings from the layer immediately before the classification head?
Context
In the standalone version, this is straightforward using a forward hook:
model_.model_[-2].register_forward_hook(lambda x: ...)
However, I couldn't find an equivalent layer to attach a hook to in the new implementation.
I assume, it should be something like:
clf = clf = RealMLP_TD_Classifier()
layer = clf.alg_interface_.model.model ...
layer.register_forward_hook(lambda x: ...)
What I'm looking for
Either:
- A pointer to the correct layer/module to hook into, or
- A built-in API for extracting intermediate representations
Apologies if this is already documented somewhere and I missed it — happy to be pointed in the right direction.