Results for torch
I want to implement a function like "reverse" map of inverse value of torch.unique. For example, torch.unique function can return the unique values un...
I want to rewrite this function to improve time performances. I would like to use only torch primary functions and avoid using any for loops. The foll...
I'm trying to employ my GPU card into Jupyter Notebook, and I got stuck with TensorFlow. But I have succeeded with torch. I have the following setup: ...
i know that torch.nn.CrossEntropyLoss(weight=?) the parameter "weight" is meant to balance the unbalance between samples from different classes, its t...
Im trying to export the SPIGA model to .onnx format. My code to do so is the following: # Create three dummy tensors with the specified sizes inpu...
I have the following code: try: # faster, but requires more memory G = self.sparse.to_dense().t() @ self.sparse.to_dense() ...
I have 2 different ways to load a model (in this case, a torch resnet50 model pretrained on places_365, can be found here: https://github.com/CSAILVis...
import torchaudio # get length of file in samples(得到样本中文件的长度) info = {} # 创建列表 si, _ = torchaudio.info(str(path)) # 会返回文件信息(Get signal information o...
I built a TransformerEncoder model, and it changes the output's sequence length if I use "with torch.no_grad()" during the evaluation mode. My model d...
I am doing some experiments on transformer models using pytorch and need to make some modifications that require me to look at different weight matric...
this is my system : No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jamm...
tf-nightly version = 2.12.0-dev2023203 Python version = 3.10.6 CUDA drivers version = 525.85.12 CUDA version = 12.0 Cudnn version = 8.5.0 I am using ...
I want to convert a list of list to torch.LongTensor. The element in a list of sequence means embedding index, and each list has different size. For e...
Python 3.11.1 , With stable version of PyTorch pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 Def...
Pytorch summary caused runtimer error. Following is the model. Runtime error occured while printing the summary of the model. I used torchsummary.summ...
the code c = torch.rand((2000, 64, 64)).to('cuda') d = torch.rand((2000, 64, 64)).to('cuda') t3 = time.time() s1 = c+d s2 = torch.concat((a, b), dim=2...
Let's say we have a tensor x of size [60,9] and a tensor y of size [60,9] Is it possible to do an operation like xx,yy = torch.meshgrid(x,y) such that...
I am trying to use the fastai library to build a machine learning model for object detection. I'm not an expert in machine learning, so I searched onl...
There is a random initialized torch tensor of the shape as below. Inputs tensor1 = torch.rand((4,2,3,100)) tensor2 = torch.rand((4,2,3,100)) tensor1 a...
I'm trying to use GPU from inside my docker container. I'm using docker with version 19.03 on Ubuntu 18.04. Outside the docker container if I run nvid...
I just want to install pytorch, I ran this in the terminal: pip install torch And it displays: Collecting torch Killed What is the problem? ...
Suppose I have 2 machines with 4 GPUs each. Suppose that each instance of the training algorithm requires 2 GPUs. I would like to run 4 processes, 2 ...
On a Windows 10 PC with an NVidia GeForce 820M I installed CUDA 9.2 and cudnn 7.1 successfully, and then installed PyTorch using the instructions at p...
The error that I am getting when I use import torchvision is this: Error Message "*Traceback (most recent call last): File "/Users/gokulsrin/Deskt...
When I download models through Torch Hub, models are automatically downloaded in /home/me/.cache/torch. How can I modify this behavior ? ...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?