Skip to main content

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.

-3 votes
0 answers
14 views

Why the Intel Iris performs better than RTX 3050 laptop GPU in training a Yolov8 model [closed]

I am facing a very weird situation. I have Dell G-15 Gaming laptop with Core i5 12500h and Rtx 3050. I am new to deep learning and AI. I am training a model with Yolo v8 for Automated Number Plate ...
Ahsan Irfan's user avatar
0 votes
0 answers
21 views

More CPU cores lead to less performance DRL (Deep Reinforcement Learning)

We are currently working on a deep RL project and are encountering an issue where switching the training from our laptops to a workstation with more CPU cores causes the performance to drastically ...
Vince's user avatar
  • 11
0 votes
0 answers
10 views

Set torch.nn.Parameter's data, including the gradient

I have an existing nn.Parameter, and a tensor with a gradient. I want to set the tensor to the parameter in a way that the parameter will have the same gradient (including perhaps .grad_fn and so on). ...
Bipolo's user avatar
  • 73
0 votes
0 answers
16 views

Finetuning BERT on classification task, tensor device mismatch error

I'm having trouble on fine-tuning a BERT model on a classification task, as I'm quite new to this. My data is composed of two columns, "item_title" (my input) and "meta_categ_id" (...
Jerry Zhu's user avatar
0 votes
1 answer
15 views

When calling torchvision.transforms.Normalize and converting to PIL.Image, how are values above 1 handled?

Applying torchvision.Normalize should lead to values below 0 and above 1, and thus below 0 and 255 when switching to integer values. However, when watching the values, this seems NOT to be the case. ...
GabrielGodefroy's user avatar
0 votes
0 answers
10 views

RuntimeError: The size of tensor a (49313) must match the size of tensor b (49310) at non-singleton dimension 0

I'm looking to use a Sequential.nn model in Pytorch to predict Cost. I'm encountering the following error when attempting to calculate loss off the model. I've had some trouble trying to use nn to ...
Aditi Srivastava Rorvig's user avatar
0 votes
0 answers
14 views

Inconsistent tensor device management detected by autograd

In my code, I encountered issues with tensor device management, specifically with tensors stored in custom containers (TensorPack objects). Initially, tensors were defaulting to CPU, even when the ...
ir0098's user avatar
  • 149
1 vote
1 answer
56 views

Generate n random 2D points within a valid region

I want to generate a fixed number of random-uniformly distributed xy points within a valid mask. The generated points should be continuous, i.e. can be "between pixels". I'm looking for an ...
Toni's user avatar
  • 33
0 votes
0 answers
6 views

ValueError: GetLogdirSubdirectories: path exists and is not a directory, logs

I'm using Tensorboard, which is in the pytorch package, and I've generated a quadratic function value and written it into a folder called Logs, but when I type Tensorboard --logdir=logs in the ...
bborn stu's user avatar
0 votes
1 answer
20 views

How to convert a set of tensor values to a list while keeping the format float precision

I have a 3 lists of ids (sequence[i].id_column) and when I print them, I see (I don't know for what reason) the format of the second list changes! for example 4.2 becomes 4.2e+00. I tried to add all ...
kami2024's user avatar
1 vote
0 answers
11 views

Why loss value in probablistic-layers at the beginning of training proccess is large value

I try to build model with conv-flipout layer and desne-flipout layer instead of conv2d and dense-layer, but when training the model, at first the loss value become large as (100) then decrease slowly ...
a-eng's user avatar
  • 47
0 votes
0 answers
30 views

Which api in `libtorch` corresponding the `ctx.needs_input_grad` in pytorch when to define custom `torch.autograd.Function`?

When I tanslate the following python code to cpp code with libtorch api class _SphericalHarmonics(torch.autograd.Function): """Spherical Harmonics""" @...
Zhiguo Tang's user avatar
0 votes
0 answers
7 views

ONNXRuntimeError for exported torchvision / fasterrcnn_mobilenet_v3_large_fpn

I get an ONNXRuntimeError when running FasterRCNN model exported to .onnx Error: onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero ...
Julio Milani's user avatar
0 votes
0 answers
32 views

CUDA Out of Memory Error with RTX 4060 When Training ResNet-18 on 128x128 Images

I am encountering a CUDA out-of-memory error while training a ResNet-18 model on 128x128 images using my RTX 4060 GPU. Despite reducing the batch size, I still face this issue. Below are the details ...
Javad Ibrahimli's user avatar
0 votes
0 answers
14 views

Loss function showing 'nan' when trying to run across multiple GPUs in Pytorch lightning

I'm trying to implement Pytorch lightning into a model I have written to solve the Allen-cahn diffusion equation. When I run the code on one gpu, the program runs as expected, but when I try to use ...
Aaronthetechguy's user avatar

15 30 50 per page
1
2 3 4 5
1617