# Theano library function equivalent in PyTorch

**URL:** <https://discuss.pytorch.org/t/theano-library-function-equivalent-in-pytorch/84388>\
**Category:** reinforcement-learning\
**Created:** [June 6, 2020, 9:18am UTC](https://discuss.pytorch.org/t/theano-library-function-equivalent-in-pytorch/84388 "2020-06-06T09:18:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ahmadreza9](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ahmadreza9/32/25076_2.png) [@ahmadreza9](https://discuss.pytorch.org/u/ahmadreza9)\
**Post date:** [June 7, 2020, 9:52am UTC](https://discuss.pytorch.org/t/theano-library-function-equivalent-in-pytorch/84388/3 "2020-06-07T09:52:54Z")

</div>

I know paradigm and your simple example which is explained in the first hyperlink of my comment. I want to create custom optimizer like this ([Custom Optimizer in PyTorch](https://discuss.pytorch.org/t/custom-optimizer-in-pytorch/22397)) so I should update weights like this:

```auto
weight_update = smth_with_good_dimensions
param.data.sub_(weight_update * learning_rate)

```

Now, how can we have a function in PyTorch like theano.function for my rms\_prop update?

---

_[View the full topic](https://discuss.pytorch.org/t/theano-library-function-equivalent-in-pytorch/84388)._
