2,172 questions
2 votes
1 answer
73 views
Having trouble with R's torch and tensor dimensions
I am trying to follow along with this webpage: https://jtr13.github.io/cc21fall2/tutorial-on-r-torch-package.html I am trying to understand R's implementation of PyTorch. I am having some trouble with ...
2 votes
1 answer
25 views
PyTorch .view() operation to manipulate tensor dimensions vis a vis using torch.unbind followed by torch.cat
In Torch, .view() reshapes the tensor. However, there are multiple ways to reshape a multi-dimensional tensor to a target shape. How does it decide between those different ways? For example, in Torch, ...
Advice
0 votes
4 replies
62 views
Regex-logic in a numpy/torch array
Evening, Is there any way to find a specific sequence of numerical values, matching certain logic (in the same way as in a regex), within a numpy/torch array or matrix row? I know i could just convert ...
0 votes
0 answers
65 views
Does setting torch_dtype=torch.float16 override 8-bit quantization in BitsAndBytes?
I'm trying to run the Qwen2.5-Coder-3B model locally with 8-bit quantization using BitsAndBytes. While loading the model, I noticed that some examples also specify torch_dtype=torch.float16. From my ...
0 votes
0 answers
89 views
pip install --no-cache-dir torch==2.7.0+cu126 works on the host machine,but fails in Docker with No matching distribution found for torch==2.7.0+cu126
I am trying to install PyTorch 2.7.0 with CUDA 12.6 support in a Docker container, but I get the following error: ERROR: Could not find a version that satisfies the requirement torch==2.7.0+cu126 (...
0 votes
0 answers
64 views
torch cant see my cuda and cudnn have some one know how to fix it?
i use windows 11 nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2025 NVIDIA Corporation Built on Wed_Apr__9_19:29:17_Pacific_Daylight_Time_2025 Cuda compilation tools, release ...
3 votes
0 answers
112 views
How does one log the operations done on a GPU during the execution of Python code?
I have encountered a particular problem while executing a function from the transformers library of huggingface on an Intel GPU wheel of torch. Since I am doing something I normally shouldn't be ...
0 votes
0 answers
64 views
Utilizing GPU with RNN models which takes it's output as input [torch]
I have a machine-translation model. In this model, I calculate a vector for a given sentence and I take this vector, aggregate with each generated output of RNN and put it into RNN again for ...
0 votes
1 answer
116 views
import torch error: DLL load failed while importing _C
I was trying to follow a project in university where we had to import cellpose. The import delivered an error message which could be tracebacked to import torch (see below). Every import was done in a ...
0 votes
0 answers
271 views
How to handle "Could not initialize NNPACK! Reason: Unsupported hardware" warning in PyTorch / Silero VAD on cloud CPU?
I’m running Silero VAD (via PyTorch + torchaudio) on a Linode cloud instance (2 dedicated CPUs, 4 GB RAM). When I process 10-minute audio chunks, I always get repeated warnings like this and it doesn'...
0 votes
1 answer
76 views
fvcore multiple arguments forward modules? [closed]
I have a model that take more than one arguments in forward. Recently I'm trying to query some informations my model by fvcore module in python, but I can't find any document for multiple forward ...
0 votes
1 answer
61 views
Tuning starting and final learning rate
If you use cosine decay for example and you have starting learning rate and final learning rate, can you tune those hyperparameters so that final learning rate is in some ratio of starting learning ...
1 vote
1 answer
142 views
Why do different L-BFGS implementations in R give different results?
I am trying to minimize a non-convex function using three different L-BFGS implementations in R: optim(method = "L-BFGS-B"), torch::optim_lbfgs(), and lbfgs::lbfgs(). I have set the same ...
0 votes
0 answers
48 views
module 'shap' has no attribute 'DeepExplainer' with pytorch
I wrote a code for SHAP on images. It was working for two days, then it brought following error : module 'shap' has no attribute 'DeepExplainer' I uninstalled and installed the SHAP module again and ...
0 votes
0 answers
40 views
torch.autograd.functional.jacobian returns tensors with all zeros
I am trying to use torch.autograd.functional.jacobian to calculate the gradients of the model parameters with respect to a set of losses, but it returns all zeros. My function definition is as follows ...