# Representation projection to 2D plot

**URL:** <https://discuss.pytorch.org/t/representation-projection-to-2d-plot/110331>\
**Category:** Uncategorized\
**Created:** [January 29, 2021, 9:09am UTC](https://discuss.pytorch.org/t/representation-projection-to-2d-plot/110331 "2021-01-29T09:09:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [January 30, 2021, 10:49am UTC](https://discuss.pytorch.org/t/representation-projection-to-2d-plot/110331/2 "2021-01-30T10:49:02Z")

</div>

Yes, you could use forward hooks to store the activation from a specific layer (I assume you meant activation instead of weight) as described [here](https://discuss.pytorch.org/t/how-can-l-load-my-best-model-as-a-feature-extractor-evaluator/17254/6) and use the linked `umap` library to reduce the dimensionality. Once this is done, you could use `matplotlib` to create a scatter plot (take a look at the examples at the bottom of the [docs](https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.pyplot.scatter.html)).

---

_[View the full topic](https://discuss.pytorch.org/t/representation-projection-to-2d-plot/110331)._
