# Proposed changes to how nn.Modules ought to be written

**URL:** <https://dev-discuss.pytorch.org/t/proposed-changes-to-how-nn-modules-ought-to-be-written/161>\
**Category:** Uncategorized\
**Created:** [March 2, 2021, 10:31pm UTC](https://dev-discuss.pytorch.org/t/proposed-changes-to-how-nn-modules-ought-to-be-written/161 "2021-03-02T22:31:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ezyang](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/ezyang/32/12_2.png) [@ezyang](https://dev-discuss.pytorch.org/u/ezyang)\
**Post date:** [March 2, 2021, 10:31pm UTC](https://dev-discuss.pytorch.org/t/proposed-changes-to-how-nn-modules-ought-to-be-written/161/1 "2021-03-02T22:31:53Z")

</div>

One of the longest running bugs in PyTorch is a request to make it possible to change the default device. We’ve resisted directly putting this feature for a long time. [[POC] Pass on Module kwargs to Parameter initialization by ezyang · Pull Request #53144 · pytorch/pytorch · GitHub](https://github.com/pytorch/pytorch/pull/53144) is the latest iteration on the discussion of how to avoid needing this, specifically for the problem of allocating Modules on a different device than the default one. Thoughts and opinions solicited.
