Questions tagged [pytorch]
PyTorch is an open-source deep learning framework and API that creates a Dynamic Computational Graph, which allows you to flexibly change the way your neural network behaves on the fly and is capable of performing automatic backward differentiation.
pytorch
24,256
questions
-1
votes
0
answers
11
views
How does PyTorch remember overwritten tensors?
I am trying to understand how PyTorch keeps track of overwritten tensor values for autodifferentiation.
In the code below, w is overwritten before autodifferentiation, yet PyTorch remembers the ...
0
votes
1
answer
23
views
load a model from checkpoint folder in pyTorch
I am trying to load a model from a certain checkpoint and use it for inference. The checkpoint folder looks like this. How do I load the model in torch from this folder. The resources I could find are ...
0
votes
0
answers
7
views
Pruning error cannot assign 'torch.cuda.FloatTensor' to parameter
I am struggling to work out why I'm getting this error when trying to apply the lottery ticket hypothesis to my model. Clearly this is happening during the pruning callback, and it seems like it's ...
0
votes
0
answers
5
views
RuntimeError with DeBERTaV3 Sequence Classification: Tensor Size Mismatch
Iam trying to fine-tune the microsoft/deberta-v3-base model for sequence classification with three labels. I have set up my tokenizer and data preprocessing, but I encounter a RuntimeError during ...
0
votes
0
answers
15
views
LSTM With DiffSharp
I'm trying to convert the full code of the example shown on this webpage: https://machinelearningmastery.com/lstm-for-time-series-prediction-in-pytorch/ which involves implementation of an LSTM.
My ...
1
vote
0
answers
17
views
CPU Memory Leak While Inference Models in Infinite Loop
I'm experiencing a CPU memory leak while running a Python script that processes text using various NLP models in an infinite loop. The script includes language translation, sentiment analysis, and ...
0
votes
0
answers
24
views
RuntimeError: Given groups=1, expected weight to be at least 1 at dimension 0, but got weight of size [0, 16, 1, 1] instead in YOLOv8 Model Training
I am trying to train a YOLOv8 model using the yolov8n-pose.pt pretrained model with the following configuration in config.yaml:
# Data
path: C:\Users\Denis\OneDrive\Documents\Project\Workout Assistant\...
1
vote
0
answers
19
views
Unpickling Error: magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'
When I am trying to load a .pt file i am seeing the following error,
str1='Dataset/ALL_feats_cgqa.pt'
m = torch.load(str1)
the error is as follows,
File "/home/Storage1/pythonCodeArea/train.py&...
0
votes
0
answers
13
views
torch.jit.script_method error when implementing a custom GRU
The code is following:
@jit.script_method
def forward(self, inputs, mask=None, training=None, initial_state=None):
# s3 = time.time()
if initial_state is None:
...
0
votes
0
answers
18
views
Pyarrow error with ray & lightning on databricks
I am trying to train a neural net with pytorch lightning on ray on a databricks cluster. As a start, I copied the example from https://docs.ray.io/en/latest/train/getting-started-pytorch-lightning....
0
votes
0
answers
9
views
when importing package dill, I encounter FileNotFoundError due to the attempt of opening os.devnull file and couldn't resolve it
Error I encountered first:
I install huggingface package: datasets, when I tried to import datasets, that's when I first encounter the FileNotFoundError from package dill, its something like this:
>...
0
votes
0
answers
14
views
PyTorch zeroGrad() Equivalent in DiffSharp?
What is the PyTorch zeroGrad() Equivalent in DiffSharp? Doesn't seem to exist any quivalent member function of the Optimizer class.
1
vote
1
answer
29
views
"OSError: [WinError 127] The specified procedure could not be found" when importing torchtext
When importing get_tokenizer from torchtext:
from torchtext.data.utils import get_tokenizer
it throws this error:
Traceback (most recent call last):
File "D:\PythonProjects\FakeNews\train.py&...
0
votes
0
answers
23
views
Python multiprocessing demon CV Model dies
I am trying to write such app. Where I am need three demon Process: VideoReader, CV Model Logic, Data REST Sender and postprocessing.The model use PyTorch, so it is necessary to run in the main ...
0
votes
1
answer
17
views
How to Create an LSTM in PyTorch that Outputs Fixed Parameters Over Time?
I have a "hybrid" model in PyTorch, which is a mix of a conceptual hydrological model and an LSTM, working as described:
I'm trying to create an LSTM that outputs one set of parameters over ...