The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [pytorch]

For questions related to the deep learning PyTorch framework.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

Is this learning rate schedule increasing the learning rate?

I was reading a PyTorch code then I saw this learning rate scheduler: ...
0
votes
1answer
44 views

Confused with backprop in pytorch with BCE loss

I've a prediction matrix(P) of dimension 3x3 and one-hot encoded label matrix(L) of dimension 3x3 as shown below. ...
2
votes
0answers
30 views

How to transfer learn Darknet YOLOv3

I've started getting into object detection in image. I have YOLOv3 neural network with Darknet framework. The network is pre-trained from COCO data set. Now I need to do some transfer learning in ...
2
votes
1answer
54 views

Issue at training simple RNN for word generation

After completing Coursera course from Andrew Ng, I wanted to implement again simple RNN for generating dinosaurs name based on a text file containing around 800 dinosaurs name. This is done with ...
0
votes
0answers
13 views

Training, validation loss and accuracy yolov3?

This is a version of Yolo V3 implemented in PyTorch – YOLOv3 in PyTorch I am trying to use transfer learning to train this yolov3 implementation following the directions given in this post. This is ...
1
vote
0answers
25 views

Initial LSTM hidden state and cell

If we use LSTMCell from torch: The initial hidden and cell layers should be CONSTANT (from the first time you run the program) and saved right? Like random seeds? ...
0
votes
0answers
20 views

Super Resolution CNN generates black dots on output images

I have been trying to train a CNN for the super-resolution task based on the work of Dong et al., 2015 [1]. The network structure built in PyTorch is as follows: ...
1
vote
1answer
44 views

Are the training loss and validation loss plotted per sample or per batch?

I am using a CNN to train on some data, where training size = 21700 samples, and test size is 653 samples, and say I am using a batch_size of 500 (I am accounting for samples out of batch size as well)...
1
vote
1answer
63 views

LSTM text classifier shows unexpected cyclical pattern in loss

I'm training a text classifier in PyTorch and I'm experiencing an unexplainable cyclical pattern in the loss curve. The loss drops drastically at the beginning of each epoch and then starts rising ...
0
votes
0answers
20 views

How to implement Multiple Neural network architecture, connected in parallel and series in Keras or Pytorch

Hello Dear StackExchange members, I want to make a deep network as shown in the image. I want each 'network 1 to look at the specific part of the input and I don't want to divide my input beforehand ...
-1
votes
1answer
64 views

Which is better to start deep learning and understand it in depth (and not just a simple overview) - pytorch or tensorflow 2.0?

I am beginning to learn deep learning. I recently spoke with an expert in the field. He suggested that I start with pytorch because of these reasons: Keras abstracts the stuff a lot that we will not ...
0
votes
0answers
12 views

Limits for a bottleneck

I have some 64x64 pixels frames from a (simulated) video, with a spaceship moving on a fixed background. The spaceship moves in a straight line with constant velocity from left to right (along the x-...
1
vote
0answers
30 views

Add a layer derivative in the loss function

I am writing a NN in pytorch and I want to add the derivative of the output with respect to one of the inner layers in the loss. Here is a simple example of what I mean: ...
1
vote
1answer
41 views

How to add some data input in a CNN?

There is this problem I have encountered, I was trying to classify the pixels from input image into classes, sort of like segmentation, using a encoder-decoder CNN. The “interested” pixels usually ...
1
vote
0answers
27 views

How to properly optimize shared network between actor and critic?

I'm building an actor-critic reinforcment learning algorithm to solve environments. I want to use a single encoder to find representation of my environment. When I share the encoder with the actor ...
1
vote
1answer
55 views

Heavy loss and inaccurate answer in pytorch

As my first AI model I have decided to make an AI model to predict multiplication of two numbers EX - [2,4] = [8]. I wrote the following code, but the loss is very high, around thousands, and it's ...
1
vote
1answer
112 views

LSTM is not converging

I am writing my first LSTM network and I would really appreciate if someone can tell me if it is right (the loss seems to go down very slowly and before playing around with hyper parameters I want to ...
2
votes
1answer
398 views

How to export Pytorch Deep Neural Networks trained model to C++ program to use it from C++?

I want to build a DNN model that I will later integrate into a C++ program. I heard that PyTorch model is hard to load it on C++ and the integration requires extra code, and it's complicated. I have ...
0
votes
0answers
171 views

`BCEWithLogitsLoss` and training class dataset imbalances in Pytorch

A bit of clarification on pytorch's BCEWithLogitsLoss: I am using : ...
2
votes
1answer
47 views

Mnist CNN Architecture

In this tutorial from Jeremy Howard: What is torch.nn really? he has an example towards the end where he creates a CNN for mnist. In nn.Conv2d he makes the ...
0
votes
0answers
34 views

How to make episode ending “good” in reinforcement learning?

TL;DR: read the bold. The rest are details I am trying to implement Reinforcement Learning:An Introduction, section 13.5 myself: on OpenAi's cartpole The algorithm seems to be learning something ...
-1
votes
2answers
69 views

Contractive auto-encoders

I am trying to implement Contractive auto-encoders in PyTorch but I don't know what I'm doing is right or not. The architecture of the auto-encoder is given below: ...