How to get vectors after running with test data? #927
sudarshan85
started this conversation in
General
Replies: 1 comment
-
Hi @sudarshan85, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm doing text classification using HuggingFace. I would like access to the [CLS] vectors of the test data after I finish my testing. Currently, these are my methods for testing:
and run the model like this
result = test_trainer.test(clf_model, dataloaders=test_dl)
However, only 1 float value of the CLS vector seems to get logged:
result[0]['cls']
returns-0.008937936276197433
How do get access to the all the CLS vectors (essentially a tensor of shape (test_data_size, 768)?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions