7 PyTorch Tips You Should Know

7 PyTorch Tips You Should Know

23.099 Lượt nghe
7 PyTorch Tips You Should Know
GitHub link: https://gist.github.com/ejmejm/1baeddbbe48f58dbced9c019c25ebf71 Here are 7 tips for improving your PyTorch skills. These are all things that I thought of because I use on a normal basis. PyTorch has a lot of need things you can do with modeling to distributions, let me know other tips you have in the comments below! Tips: 1. Create tensors directly on the target device 2. Use Sequential layers when possible 3. Don't make lists of layers 4. Make use of distributions 5. Use the detach method when the gradient is not needed 6. How to delete a model from the GPU 7. Call the eval method before testing