They weren’t importing init into the nn module. This has been fixed in a recent PR and should be in the next release. You can have it now if you compile from source on master. Unfortunately, the documentation is always reflective of master, not the latest stable release, so it can have a lot of things that don’t work in the version you may have if you’re just pip or conda installing PyTorch. I wish they would let you select the version of the docs you want to view. If that’s already possible, I haven’t found out how, but then again, I’ve made it a habit to just install PyTorch from source every time and keep it updated. That seems the best course of action with a project that is rapidly improving.