About 49,500 results
Open links in new tab
  1. torch.Tensor.toPyTorch 2.10 documentation

    According to C++ type conversion rules, converting floating point value to integer type will truncate the fractional part. If the truncated value cannot fit into the target type (e.g., casting torch.inf to

  2. Get Started - PyTorch

    For the majority of PyTorch users, installing from a pre-built binary via a package manager will provide the best experience. However, there are times when you may want to install the bleeding edge …

  3. pytorch when do I need to use `.to(device)` on a model or tensor?

    Jul 23, 2020 · I am new to Pytorch, but it seems pretty nice. My only question was when to use tensor.to (device) or Module.nn.to (device). I was reading the documentation on this topic, and it …

  4. torch.Tensor.to — PyTorch 1.11.0 documentation

    Performs Tensor dtype and/or device conversion. A torch.dtype and torch.device are inferred from the arguments of self.to(*args, **kwargs). If the self Tensor already has the correct torch.dtype and …

  5. Move Your Tensors to GPU with `torch.to ()` in PyTorch

    Dec 14, 2024 · In this article, we will delve into the torch.to() method, demonstrate how to move your tensors to a GPU, and provide insights into best practices. PyTorch tensors are similar to NumPy …

  6. GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in …

    PyTorch provides Tensors that can live either on the CPU or the GPU and accelerates the computation by a huge amount. We provide a wide variety of tensor routines to accelerate and fit your scientific …

  7. Why would we use to () method in pytorch? - Stack Overflow

    Jun 23, 2019 · Under the hood, type and to methods perform the same type check & convert if needed, but the to method can take additional arguments. Why would we use to (device) method in pytorch? …

  8. PyTorch

    2 days ago · PyTorch Foundation is the deep learning community home for the open source PyTorch framework and ecosystem.

  9. Welcome to PyTorch Tutorials — PyTorch Tutorials 2.11.0+cu130 …

    Learn how to use PyTorch to train a Deep Q Learning (DQN) agent on the CartPole-v0 task from the OpenAI Gym.

  10. User Guide — PyTorch 2.10 documentation

    Aug 13, 2025 · This guide will help you harness the power of PyTorch to create and deploy machine learning models effectively. This guide is a work in progress.