# Computer vision, ResNet, Sharing weights

**URL:** <https://discuss.pytorch.org/t/computer-vision-resnet-sharing-weights/148636>\
**Category:** vision\
**Created:** [April 8, 2022, 8:25am UTC](https://discuss.pytorch.org/t/computer-vision-resnet-sharing-weights/148636 "2022-04-08T08:25:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aymen\_Sadraoui](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/aymen_sadraoui/32/33288_2.png) [@Aymen\_Sadraoui](https://discuss.pytorch.org/u/Aymen_Sadraoui)\
**Post date:** [April 8, 2022, 8:25am UTC](https://discuss.pytorch.org/t/computer-vision-resnet-sharing-weights/148636/1 "2022-04-08T08:25:08Z")

</div>

Hi,

I wanna create a model that takes 3 inputs and each input will pass through a resnet. How to share weights between the 3 resnets?

 ![Screenshot from 2022-04-08 10-24-10](https://discuss.pytorch.org/uploads/default/original/3X/8/a/8a4ee6eafb6c67a279fb36e1172e9c54e9e6b43c.png)

---

<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:** [April 8, 2022, 10:07am UTC](https://discuss.pytorch.org/t/computer-vision-resnet-sharing-weights/148636/2 "2022-04-08T10:07:19Z")

</div>

I might misunderstand the question, but wouldn’t passing all 3 inputs to a single model work?

---

<div class="post-metadata">

**Author:** ![Aymen\_Sadraoui](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/aymen_sadraoui/32/33288_2.png) [@Aymen\_Sadraoui](https://discuss.pytorch.org/u/Aymen_Sadraoui)\
**Post date:** [April 8, 2022, 11:14am UTC](https://discuss.pytorch.org/t/computer-vision-resnet-sharing-weights/148636/3 "2022-04-08T11:14:22Z")

</div>

No the 3 inputs are images of 3 different magnifications so I want each input to be processed by one ResNet and all these resnets share the weights.
