# Shared Weights Embedding Layer (Stack / Unstack)

**URL:** <https://community.konduit.ai/t/shared-weights-embedding-layer-stack-unstack/1477>\
**Category:** DL4J\
**Created:** [July 2, 2021, 7:10pm UTC](https://community.konduit.ai/t/shared-weights-embedding-layer-stack-unstack/1477 "2021-07-02T19:10:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@thomas](https://community.konduit.ai/u/thomas)\
**Post date:** [July 2, 2021, 7:10pm UTC](https://community.konduit.ai/t/shared-weights-embedding-layer-stack-unstack/1477/1 "2021-07-02T19:10:58Z")

</div>

Hi,  
i want to get a model nearly like your test case:

> <https://github.com/eclipse/deeplearning4j/blob/6335b5e933f13d2bdb5c1f7e5896c45eb96839d7/deeplearning4j-core/src/test/java/org/deeplearning4j/nn/graph/graphnodes/TestGraphNodes.java#L295-L304>

my question: ist every unstack vertex like a pop operation to the given stack. i would like to merge every result from the embedded layer to one big output, which goes to one single target layer.  
like

```auto
addVertex("unstack1", new UnstackVertex(0, 2),"embedded")
addVertex("unstack2", new UnstackVertex(0, 2),"embedded")
addVertex("merge", new MergeVertex(), "unstack1","unstack2")

```

Best regards

Thomas
