Category "torch"

transformers and BERT downloading to your local machine

I am trying to replicates the code from this page. At my workplace we have access to transformers and pytorch library but cannot connect to internet from our py

Bool value of Tensor with more than one value is ambiguous in Pytorch

I want to create a model in pytorch, but I can't compute the loss. It's always return Bool value of Tensor with more than one value is ambiguous Actually, I

How do I load a local model with torch.hub.load?

I need to avoid downloading the model from the web (due to restrictions on the machine installed). This works, but it downloads the model from the Internet mode

How to load the MNIST dataset from the datasets in torch C++

I'm new to torch and c++ i want to create a basic simple network that does hand digit recognition this is my Net struct. struct Net:torch::nn::Module { Net(

Exception when converting Unet from pytorch to onnx

I'm trying to convert a Unet model from PyTorch to ONNX. Running the following code: import torch from unets import Unet, thin_setup net = Unet(in_features=3,

Could not find a version that satisfies the requirement torch>=1.0.0?

Could not find a version that satisfies the requirement torch>=1.0.0 No matching distribution found for torch>=1.0.0 (from stanfordnlp)

numpy equivalent code of unsqueeze and expand from torch tensor method

I have these 2 tensors box_a = torch.randn(1,4) box_b = torch.randn(1,4) and i have a code in pytorch box_a[:, 2:].unsqueeze(1).expand(1, 1, 2) but i want to

Docker: can't install torch

Dockerfile: FROM cityflowproject/cityflow WORKDIR /usr/TrafficMannager RUN apt-get update && apt-get upgrade -y && apt-get clean RUN pip inst

Error: caskroom/cask was moved. Tap homebrew/cask-cask instead

I try to go through installation process Github on MacOs Catalina The first step is to execute in Terminal: cd ~/ curl -s https://raw.githubusercontent.com/to

Faster way to do multiple embeddings in PyTorch?

I'm working on a torch-based library for building autoencoders with tabular datasets. One big feature is learning embeddings for categorical features. In pra