Krischal's Digital Garden

Home

❯

Machine Learning

Machine Learning

Jun 17, 20261 min read

Contains snippets, and practices for machine learning as of now.

  • Getting current accelerator device easy snippet:

    Crossplatform code of getting default accerator in pytorch

    import torch
    device = torch.accelerator.current_accelerator() or torch.device("cpu")
    Link to original
  • Initializing Lazy Layers in Pytorch
  • Conventions when using pytorch for machine learning

3 items under this folder.

  • Jun 17, 2026

    Conventions when using pytorch for machine learning

    • Jun 17, 2026

      Crossplatform code of getting default accerator in pytorch

      • Jun 17, 2026

        Initializing Lazy Layers in Pytorch


        Graph View

        Created with Quartz v5.0.0 © 2026

        • GitHub
        • LinkedIn
        • Copyright © 2026 Krischal Khanal