# How to use a custom embedding layer as input in get\_encoder function

**URL:** <https://discuss.huggingface.co/t/how-to-use-a-custom-embedding-layer-as-input-in-get-encoder-function/41505>\
**Category:** 🤗Transformers\
**Created:** [May 30, 2023, 2:34pm UTC](https://discuss.huggingface.co/t/how-to-use-a-custom-embedding-layer-as-input-in-get-encoder-function/41505 "2023-05-30T14:34:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VKSBI](https://avatars.discourse-cdn.com/v4/letter/v/df788c/32.png) [@VKSBI](https://discuss.huggingface.co/u/VKSBI)\
**Post date:** [May 30, 2023, 2:34pm UTC](https://discuss.huggingface.co/t/how-to-use-a-custom-embedding-layer-as-input-in-get-encoder-function/41505/1 "2023-05-30T14:34:04Z")

</div>

I’m trying to tweak inputs from BART model. I’m trying to use output from a different embedding layer and use that as input for my model to get encoder outputs.
