# Mat1 and mat2 shapes cannot be multiplied!

**URL:** <https://discuss.pytorch.org/t/mat1-and-mat2-shapes-cannot-be-multiplied/159289>\
**Category:** vision\
**Created:** [August 16, 2022, 8:01am UTC](https://discuss.pytorch.org/t/mat1-and-mat2-shapes-cannot-be-multiplied/159289 "2022-08-16T08:01:06Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![azhanmohammed](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/azhanmohammed/32/49537_2.png) [@azhanmohammed](https://discuss.pytorch.org/u/azhanmohammed)\
**Post date:** [August 16, 2022, 9:50am UTC](https://discuss.pytorch.org/t/mat1-and-mat2-shapes-cannot-be-multiplied/159289/7 "2022-08-16T09:50:13Z")

</div>

> [@GHALI\_Ahmed](#):
>
> 1: How can copy the layers from model\_x to create new model without issues?

[This answer](https://discuss.pytorch.org/t/how-can-i-replace-the-forward-method-of-a-predefined-torchvision-model-with-my-customized-forward-function/54224/8) here discusses in detail about how to create your own custom forward call using a pre-defined model.

> [@GHALI\_Ahmed](#):
>
> 2: I want just delete some layer from the model\_x.

[This post](https://discuss.pytorch.org/t/how-to-remove-the-intermediate-layers-of-model/85068/4) here discusses about removing intermediate layers from a model.

Hope these are helpful.

---

_[View the full topic](https://discuss.pytorch.org/t/mat1-and-mat2-shapes-cannot-be-multiplied/159289)._
