Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
An unofficial styleguide and best practices summary for PyTorch
| Date | Stars |
|---|---|
| 2026-07-24 | 2016 |
| 2026-07-25 | 2016 |
| 2026-07-28 | 2016 |
| 2026-07-30 | 2016 |
| 2026-08-06 | 2016 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# A PyTorch Tools, best practices & Styleguide This is not an official style guide for PyTorch. This document summarizes best practices from more than a year of experience with deep learning using the PyTorch framework. Note that the learnings we share come mostly from a research and startup perspective. This is an open project and other collaborators are highly welcomed to edit and improve the document. You will find three main parts of this doc. First, a quick recap of best practices in Python, followed by some tips and recommendations using PyTorch. Finally, we share some insights and experiences using other frameworks which helped us generally improve our workflow. **Update 20.12.2020** - Added a full example training a model on cifar10 - Add setup guide for using VS Code and the remote extension **Update 30.4.2019** >After so much positive feedback I also added a summary of commonly used building blocks from our projects at [Lightly](https://lightly.ai/): You will find building blocks for (Self-Attention, Perceptual Loss using VGG, Spectral Normalization, Adaptive Instance Normalization, ...) <br>[Code Snippets for Losses, Layers and other building blocks](building_blocks.md) ## We recommend using Python 3.6+ From our experience we recommend using Python 3.6+ because of the following features which became very handy for clean and simple code: * [Support for typing since Python 3.6.](https://medium.com/@ageitgey/learn-how-to-use-static-type-checking-in-python-3-6-in-10-minutes-12c86d72677b) * [Support of f strings since Python 3.6](https://realpython.com/python-f-strings/) ## Python Styleguide recap We try to follow the Google Styleguide for Python. Please refer to the well-documented [style guide on python code provided by Google](https://github.com/google/styleguide/blob/gh-pages/pyguide.md). We provide here a summary of the most commonly used rules: ### Naming Conventions *From 3.16.4* | Type | Convention | Example | |------|------------|---------| | Packages & Modules | lower_with_under | from **prefetch_generator** import BackgroundGenerator | | Classes | CapWords | class **DataLoader** | | Constants | CAPS_WITH_UNDER | **BATCH_SIZE=16** | | Instances | lower_with_under | **dataset** = Dataset | | Methods & Functions | lower_with_under() | def **visualize_tensor()** | | Variables | lower_with_under | **background_color='Blue'** | ## IDEs ### Code Editors In general, we recommend the use of an IDE such as visual studio code or PyCharm. ~~Whereas VS Code provides syntax highlighting and autocompletion in a relatively lightweight editor PyCharm has lots of advanced features for working with remote clusters.~~ VS Code has become very powerful with its fast growing ecosystem of extensions. #### Setting up Visual Studio Code with a Remote Machine Make sure you have the following extensions installed: - Python (linting, autocompletion, syntax highlighting, code formatting) - Remote - SSH (to work with remote machines) 1. Follow the guide here: https://code.visualstudio.com/docs/remote/remote-overview #### Setting up PyCharm to work with a Remote Machine 1. Login to your remote machine (AWS, Google etc.) 2. Create a new folder and a new virtual environment 3. In Pycharm (professional edition) in the project settings setup a remote interpreter 4. Configure the remote python interpreter (path to venv on AWS, Google etc.) 5. Configure the mapping of the code from your local machine to the remote machine If set up properly this allows you to do the following: * Code on your local computer (notebook, desktop) wherever you want (offline, online) * Sync local code with your remote machine * Additional packages will be installed automatically on a remote machine * You don't need any dataset on your local machine * Run the code and debug on the remote machine as if it would be your local machine running the code ## Jupyter Notebook vs Python Scripts In general, we recommend to use jupyter notebooks for initial
Excerpt of 24,232 characters
Read on GitHubIgor Susmelj · Lightly · Switzerland
14
3
Daniel Bourke
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:7994a8d683531174, topic:pytorch