vision
functorch
Our great sponsors
vision | functorch | |
---|---|---|
19 | 11 | |
15,268 | 1,366 | |
1.3% | 1.0% | |
9.5 | 0.6 | |
4 days ago | 6 days ago | |
Python | Jupyter Notebook | |
BSD 3-clause "New" or "Revised" License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vision
-
Transitioning From PyTorch to Burn
Let's start by defining the ResNet module according to the Residual Network architecture, as replicated[1] by the torchvision implementation of the model we will import. Detailed architecture variants with a depth of 18, 34, 50, 101 and 152 layers can be found in the table below.
-
Reading a DL paper: YOLO summary and discussion
Found relevant code at https://github.com/pytorch/vision + all code implementations here
-
Open discussion and useful links people trying to do Object Detection
* Why doesnt Pytorch have YOLO! https://github.com/pytorch/vision/issues/6341
-
My Neural Net is stuck, I've run out of ideas
Sorry to be annoying but I thought it was nice to give you some news as well. I was confused as to why there isnt yolo in pytorch, here it is why https://github.com/pytorch/vision/issues/6341
-
[Discussion] Stochastic Depth with BatchNorm ?
My question is more related to the variance of the batchs. If one batch contains samples that skip a connection and samples that do not ('row' mode in the Torchvision implementation), even if the values are ajusted to preserve the expected value, the variance will be much higher because we have in practice two distributions (for x_n and x_n + f(x_n)/p), which will mess up with the update of the batch normalization. Also, at inference time, all forward passes will be done as x_{n+1} = x_n + f(x_n), which has a different variance. The torchvision implementation also offers a 'batch' mode that kinda reduce this issue (because the global variance computed this way will be the mean of both distribution variances, instead of the variance of the joint distribution) but it does not seem to be the default mode (it does not even exist in the timm implementation).
-
Solution for "RuntimeError: Couldn't load custom C++ ops"
RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.version and your torchvision version with torchvision.version and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.
-
[D] My experience with running PyTorch on the M1 GPU
$ python vgg16-cifar10.py --device "cuda" torch 1.11.0+cu102 device cuda Downloading https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz to data/cifar-10-python.tar.gz 170499072it [00:46, 3628424.66it/s] Extracting data/cifar-10-python.tar.gz to data Downloading: "https://github.com/pytorch/vision/archive/v0.11.0.zip" to /home/md/.cache/torch/hub/v0.11.0.zip Epoch: 001/001 | Batch 0000/1406 | Loss: 2.6563 Epoch: 001/001 | Batch 0100/1406 | Loss: 2.4686 Epoch: 001/001 | Batch 0200/1406 | Loss: 2.1224 Epoch: 001/001 | Batch 0300/1406 | Loss: 2.1879 Epoch: 001/001 | Batch 0400/1406 | Loss: 2.1733 Epoch: 001/001 | Batch 0500/1406 | Loss: 2.2413 Epoch: 001/001 | Batch 0600/1406 | Loss: 2.0518 Epoch: 001/001 | Batch 0700/1406 | Loss: 2.1621 Epoch: 001/001 | Batch 0800/1406 | Loss: 1.9033 Epoch: 001/001 | Batch 0900/1406 | Loss: 1.8379 Epoch: 001/001 | Batch 1000/1406 | Loss: 1.9572 Epoch: 001/001 | Batch 1100/1406 | Loss: 1.8823 Epoch: 001/001 | Batch 1200/1406 | Loss: 1.7978 Epoch: 001/001 | Batch 1300/1406 | Loss: 2.0239 Epoch: 001/001 | Batch 1400/1406 | Loss: 1.8389 Time / epoch without evaluation: 6.75 min <------------------ Epoch: 001/001 | Train: 25.52% | Validation: 26.40% | Best Validation (Ep. 001): 26.40% Time elapsed: 9.03 min Total Training Time: 9.03 min Test accuracy 26.54% Total Time: 9.48 min
-
Hey, I'm trying to find some materials about object detection in Pytorch but I'm having a hard time finding it.
And there are explanations: it's the research articles as well as the blog articles talking about them. And 99% of the code you'll find is open sourced: - The official torchvision has various models described here with their reference papers and the code of these models is found on the gitub page - You can find almost-official YOLO implementation on this github page.
-
[D] Efficiently loading videos in PyTorch without extracting frames
Maybe VideoClips? see the discussion here: https://github.com/pytorch/vision/issues/1446.
-
PyTorch 1.10
haha, yes, but that requires you to modify existing code to do so (which isn't always possible!).
There might also be other things you want to do (like add profiling after each op) that would be tedious to do manually, but can easily automated with FX (https://pytorch.org/tutorials/intermediate/fx_profiling_tuto...).
Another example is the recent support from torchvision for extracting intermediate feature activations (https://github.com/pytorch/vision/releases/tag/v0.11.0). Like, sure, it was probably possible to refactor all of their code to enable users to specify extracting an intermediate feature, but it's much cleaner to do with FX.
functorch
-
What is the most efficient approach to ensemble a pytorch actor-critic model?
I would suggest checking https://pytorch.org/functorch/ and https://github.com/metaopt/torchopt for efficient inference and training with ensembles (e.g., t be independent actors in a multi-agent setting or multiple critics).
-
[P] Multidimensional array batch indexing for pytorch and numpy
There were some bugs still with advanced indexing in an older release of functorch, I believe they should be fixed now though: https://github.com/pytorch/functorch/pull/862
-
Jax vs. Julia (Vs PyTorch)
Tangentially related but there is an effort to get some of the features of JAX into PyTorch: https://pytorch.org/functorch/
-
[D] Current State of JAX vs Pytorch?
Fwiw, composable vmap and stuff like that have also been implemented in PyTorch now - see functorch :) https://github.com/pytorch/functorch
-
[D] Ideal deep learning library
Fwiw, itโs not like Pytorchโs design prevents function transformations from being implemented. See functorch for an example of grad/vmap function transforms: https://github.com/pytorch/functorch
-
[P] Made Some Pytorch Modules For Agent Systems
You may find vmap from functorch to be quite useful: https://github.com/pytorch/functorch
-
[D] Are you using PyTorch or TensorFlow going into 2022?
If you're interested in function transformations in PyTorch, try out functorch :) https://github.com/pytorch/functorch
- PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
-
Show HN: How does Jax allocate memory on a TPU? An interactive C++ walkthrough
The pytorch programming model is just really hard to adapt to an XLA-like compiler. Imperative python code doesn't translate to an ML graph compiler particularly well; Jax's API is functional, so it's easier to translate to the XLA API. By contrast, torch/xla uses "lazy tensors" that record the computation graph and compile when needed. The trouble is, if the compute graph changes from run to run, you end up recompiling a lot.
I guess in Jax you'd just only apply `jax.jit` to the parts where the compute graph is static? I'd be curious to see examples of how this works in practice. Fwiw, there's an offshoot of pytorch that is aiming to provide this sort of API (see https://github.com/pytorch/functorch and look at eager_compilation.py).
(Disclaimer: I worked on this until quite recently.)
-
PyTorch 1.10
https://github.com/pytorch/functorch) but not the second.
Disclaimer: I work on PyTorch, and Functorch more specifically, although my opinions here aren't on behalf of PyTorch.
What are some alternatives?
jax - Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more
nn - ๐งโ๐ซ 60 Implementations/tutorials of deep learning papers with side-by-side notes ๐; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), ๐ฎ reinforcement learning (ppo, dqn), capsnet, distillation, ... ๐ง
onnx-simplifier - Simplify your onnx model
yolov5 - YOLOv5 ๐ in PyTorch > ONNX > CoreML > TFLite
torch2trt - An easy to use PyTorch to TensorRT converter
apple_m1_pro_python - A collection of ML scripts to test the M1 Pro MacBook Pro
BinaryBuilder.jl - Binary Dependency Builder for Julia
py2many - Transpiler of Python to many other languages
TensorRT - PyTorch/TorchScript/FX compiler for NVIDIA GPUs using TensorRT
onnxruntime - ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator