torchtyping

Type annotations and dynamic checking for a tensor's shape, dtype, names, etc. (by patrick-kidger)

Torchtyping Alternatives

Similar projects and alternatives to torchtyping

  1. TypeScript

    1,427 torchtyping VS TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. fastapi

    FastAPI framework, high performance, easy to learn, fast to code, ready for production

  4. Nim

    Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

  5. Roslyn

    The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

  6. pyright

    Static Type Checker for Python

  7. star-history

    48 torchtyping VS star-history

    The missing star history graph of GitHub repos - https://star-history.com

  8. equinox

    Elegant easy-to-use neural networks + scientific computing in JAX. https://docs.kidger.site/equinox/

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. marshal.ts

    30 torchtyping VS marshal.ts

    A new full-featured and high-performance TypeScript framework

  11. dex-lang

    Research language for array processing in the Haskell/ML family

  12. einops

    23 torchtyping VS einops

    Flexible and powerful tensor operations for readable and reliable code (for pytorch, jax, TF and others)

  13. functorch

    11 torchtyping VS functorch

    functorch is JAX-like composable function transforms for PyTorch.

  14. jaxtyping

    Type annotations and runtime checking for shape and dtype of JAX/NumPy/PyTorch/etc. arrays. https://docs.kidger.site/jaxtyping/

  15. hasktorch

    15 torchtyping VS hasktorch

    Tensors and neural networks in Haskell

  16. miniF2F

    6 torchtyping VS miniF2F

    Formal to Formal Mathematics Benchmark

  17. tsalib

    2 torchtyping VS tsalib

    Tensor Shape Annotation Library (numpy, tensorflow, pytorch, ...)

  18. tiny-cuda-nn

    Lightning fast C++/CUDA neural network framework

  19. tensor_annotations

    Annotating tensor shapes using Python types

  20. torchsde

    5 torchtyping VS torchsde

    Differentiable SDE solvers with GPU support and efficient sensitivity analysis.

  21. mypy

    125 torchtyping VS mypy

    Optional static typing for Python

  22. aiomultiprocess

    Take a modern Python codebase to the next level of performance.

  23. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better torchtyping alternative or higher similarity.

torchtyping discussion

Log in or Post with

torchtyping reviews and mentions

Posts with mentions or reviews of torchtyping. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-11.
  • [D] Have their been any attempts to create a programming language specifically for machine learning?
    12 projects | /r/MachineLearning | 11 Feb 2023
    Not really an answer to your question, but there are Python packages that try to solve the problem of tensor shapes that you mentioned, e.g. https://github.com/patrick-kidger/torchtyping or https://github.com/deepmind/tensor_annotations
  • What's New in Python 3.11?
    14 projects | news.ycombinator.com | 26 Jun 2022
    I disagree. I've had a serious attempt at array typing using variadic generics and I'm not impressed. Python's type system has numerous issues... and now they just apply to any "ArrayWithNDimensions" type as well as any "ArrayWith2Dimenensions" type.

    Variadic protocols don't exist; many operations like stacking are inexpressible; the synatx is awful and verbose; etc. etc.

    I've written more about this here as part of my TorchTyping project: [0]

    [0] https://github.com/patrick-kidger/torchtyping/issues/37#issu...

  • Can anyone point out the mistakes in my input layer or dimension?
    1 project | /r/learnmachinelearning | 6 Jun 2022
    also https://github.com/patrick-kidger/torchtyping
  • [D] Anyone using named tensors or a tensor annotation lib productively?
    2 projects | /r/MachineLearning | 18 Apr 2022
    FWIW I'm the author of torchtyping so happy to answer any questions about that. :) I think people are using it!
  • [D] Ideal deep learning library
    9 projects | /r/MachineLearning | 5 Jan 2022
    The one thing I really *really* wish got more attention was named tensors and the tensor type system. Tensor misalignment errors are a constant source of silently-failing bugs. While 3rd party libraries have attempted to fill this gap, it really needs better native support. In particular it seems like bad form to me for programmers to have to remember the specific alignment and broadcasting rules, and then have to apply them to an often poorly documented order of tensor indices. I'd really like to see something like tsalib's warp operator made part of the main library and generalized to arbitrary function application, like a named-tensor version of fold. But preferably using notation closer to that of torchtyping.
  • [P] torchtyping -- documentation + runtime type checking of tensor shapes (and dtypes, ...)
    2 projects | /r/MachineLearning | 7 Apr 2021
    Yes it does work with numerical literals! It support using integers to specify an absolute size, strings to specify names for dimensions that should all be consistently sized (and optionally also checks named tensors), "..." to indicate batch dimensions, and so on. See the full list here.
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 21 Jun 2025
    InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →

Stats

Basic torchtyping repo stats
7
1,431
2.8
about 2 months ago

Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com

Did you know that Python is
the 2nd most popular programming language
based on number of references?