# How to set the constraints of the parameters \[weights and bias\]

**URL:** <https://discuss.pytorch.org/t/how-to-set-the-constraints-of-the-parameters-weights-and-bias/112816>\
**Category:** Uncategorized\
**Created:** [February 24, 2021, 6:43am UTC](https://discuss.pytorch.org/t/how-to-set-the-constraints-of-the-parameters-weights-and-bias/112816 "2021-02-24T06:43:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackma](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jackma/32/35028_2.png) [@jackma](https://discuss.pytorch.org/u/jackma)\
**Post date:** [February 24, 2021, 6:43am UTC](https://discuss.pytorch.org/t/how-to-set-the-constraints-of-the-parameters-weights-and-bias/112816/1 "2021-02-24T06:43:49Z")

</div>

Recently, I am reading the paper Input convex neural network whose implementation is using tensorflow. I am working to reproducing the network and do some simulation using PyTorch.

But how to set the constraints of the weights of the network.

---

<div class="post-metadata">

**Author:** ![ksz](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/k/db5fbb/32.png) [@ksz](https://discuss.pytorch.org/u/ksz)\
**Post date:** [February 24, 2021, 10:50am UTC](https://discuss.pytorch.org/t/how-to-set-the-constraints-of-the-parameters-weights-and-bias/112816/2 "2021-02-24T10:50:54Z")

</div>

Maybe this can help you: [Set constraints on parameters or layers](https://discuss.pytorch.org/t/set-constraints-on-parameters-or-layers/23620)

If not describe your problem better. I don’t know this paper (and unfortunately I don’t have time to analyze it deeply).

---

<div class="post-metadata">

**Author:** ![jackma](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jackma/32/35028_2.png) [@jackma](https://discuss.pytorch.org/u/jackma)\
**Post date:** [February 24, 2021, 11:20am UTC](https://discuss.pytorch.org/t/how-to-set-the-constraints-of-the-parameters-weights-and-bias/112816/3 "2021-02-24T11:20:42Z")

</div>

Thanks! I will check it later.
