Questions tagged [pytorch]

For questions related to the deep learning PyTorch framework.

43 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
42 views

Why does GAN loss converge to log(2) and not -log(2)?

In Goodfellow's paper, he says: Hence, by inspecting Eq. 4 at $D^*_G (\mathbf{x}) = \frac{1}{2}$, we find $C(G) = \log \frac{1}{2}+ \log \frac{1}{2} = − \log 4$. To see that this is the best ...
2
votes
0answers
62 views

What is the equivalent PyTorch version of tensorflow lite

Update Checked the PyTorch Mobile which is designed to Android and iOS. Although according to the document, it says it can build for ARM CPUs, but there isn't any documentation mention about how to ...
2
votes
0answers
40 views

Why does the BatchNormalization layer produce different outputs during training and inference?

I modified resnet50 architecture to get a regression network. I just add batchnorm1d and ReLU layers just before the fully connected layer. During the training, the output of batchnorm1d layer is ...
2
votes
0answers
209 views

How can I train YOLO with the COCO dataset?

I am trying to implement the original YOLO architecture for object detection, but I am using the COCO dataset. However, I am a bit confused about the image sizes of COCO. The original YOLO was trained ...
2
votes
0answers
840 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 ...
1
vote
0answers
42 views

Is it good practice to save NLP Transformer based pre-trained models into file system in production environment

I have developed a multi label classifier using BERT. I'm leveraging Hugging Face Pytorch implementation for transformers. I have saved the pretrained model into the file directory in dev environment. ...
1
vote
0answers
44 views

Classification or regression for deep Q learning

DQN implemented at https://github.com/PacktPublishing/PyTorch-1.x-Reinforcement-Learning-Cookbook/blob/master/Chapter07/chapter7/dqn.py uses the mean square error loss function for the neural network ...
1
vote
0answers
40 views

In layman's terms, what is stochastic computation graph?

I'm going through the distributions package on PyTorch's documentation and came across the term stochastic computation graph. In layman's terms, what is it?
1
vote
0answers
42 views

Policy Gradient on Tic-Tac-Toe not working

I wanted to implement the Policy Gradient on Tic-Tac-Toe. I tried to use the code that worked for any environment like CartPole-v0 to my Tic-Tac-To game. But it is not learning. There are no errors. ...
1
vote
0answers
34 views

Benchmarking SAC on Pybullet

So far I have seen TD3 and DDPG benchmarks on Pybullet environments, but I am looking for SAC benchmarks on Pybullet too, anyone can help?
1
vote
0answers
30 views

What is the difference between FC and MLP in as used in PointNet?

I am trying to understand the PointNet network for dealing with point clouds and struggling with understanding the difference between FC and MLP: "FC is fully connected layer operating on each ...
1
vote
0answers
19 views

How can I use GPT-2 to modify seed text of one form into a different form (LENGTH INVARIANT) whilst retaining meaning?

I am currently starting a research project whereby I am trying to convert text of one form into another. i.e. If I were to write a seed sentance of the form "Scientists have finally achieved the ...
1
vote
0answers
149 views

Replace epsilon greedy action selection and the standard DQN by an Independent Gaussian Noise Network Model

Here is my code Recently, I solved the game of Atari Breakout using a classic DQN model. The convergence of the mean reward slowly improved during three days. I was interested in learning a method ...
1
vote
0answers
33 views

Is it possible to do token classification using a model such as GPT-2?

I am trying to use PyTorch's transformers as a part of a research project to do sentiment analysis of several types of review data (laptop and restaurant). To do this, my team is taking a token-...
1
vote
1answer
42 views

time-series prediction : loss going down, then stagnates with very high variance

I am trying to design a model based on LSTM cells to do time-series prediction. The ouput value is an integer in [0,13]. I have noticed that one-hot encoding it and ...
1
vote
0answers
44 views

What are the pros and cons of Keras, PyTorch and Caffe for computer vision?

I have tried to get the basic grasp of the following deep learning frameworks with python: Keras Pytorch Caffe However, I have lately noticed that people in the computer vision community care less ...
1
vote
0answers
28 views

Pytorch deep learning models and tabular data representation

I have quite a naive question regarding Pytorch deep learning models and tabular data representation. So, assume I have a dictionary of tables. Each table has some number of columns: categorical and ...
1
vote
1answer
43 views

RealNVP gives wrong probabilities

I am trying to use RealNVP with some data I have (the input size is a 1D vector of size 22). Here is the link to the RealNVP paper and here is a nice, short explanation of it (the paper is pretty long)...
1
vote
0answers
51 views

FastAi How to turn off crop in ImageDataBunch

I just trained my birds model. It works fine when I was testing it with close pictures. But when I moved the pictures further away my camera, the model was not able to detect birds. My guess is in ...
1
vote
0answers
34 views

Why is my variational auto-encoder generating random noise?

This is my first variational autoencoder. Background info: I am using the MNIST digits dataset. The model is created and trained in PyTorch. The model is able to get a reasonably low loss, but the ...
1
vote
0answers
26 views

How can I train a neural network to find the hyper-parameters with which the data was generated?

I have 10000 tuples of numbers (x1, x2, y) generated from the equation: y = np.cos(0.583 * x1) + np.exp(0.112 * x2). I want to ...
1
vote
0answers
44 views

Why are the current means and the old ones the same in this implementation of Elastic Weight Consolidation?

I'm trying to re-implement Elastic Weight Consolidation (EWC) as outlined in this paper. As a reference, I am also using this Github repository (another implementation). My model/idea is pretty ...
1
vote
0answers
12 views

Can Grad CAM feature maps be used for Training?

I am trying to recreate the architecture of the following paper: https://arxiv.org/pdf/1807.03058.pdf Can someone help me in explaining how are the feature maps coming out of the output of GradCam ...
1
vote
0answers
60 views

Focal loss for imbalanced multi class classification in Pytorch

I want an example code for Focal loss in PyTorch for a model with three class prediction. My model outputs 3 probabilities. ...
1
vote
0answers
52 views

How to train LSTM score prediction with very little data? (Bounty to be added)

I am trying to make a text score prediction network, and my dataset have 500 samples only. I know there is a public dataset called the ASAP Dataset. I have tested my model ...
1
vote
0answers
41 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? ...
1
vote
0answers
36 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
0answers
16 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
33 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
52 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
0answers
52 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 ...
0
votes
1answer
9 views

Get Neural Network to predict a tag/class on a certain word using the surrounding words as context [PyTorch]?

I am somewhat a novice at the topic of Neural Netoworks and PyTorch. I am trying to create a model that takes a word (that I have modified very slightly) and a 'window' of context around it and ...
0
votes
0answers
8 views

Automated Scoring (non-english language) Using BERT

i'm a student and i'm new to NLP. I want to build an Automated Scoring system which is in Indonesian Language using BERT. The system is expected to be able to measure the similarity of an answer(e.g: ...
0
votes
1answer
38 views

Mixing CPU and GPU for distributed PyTorch training

For a job that a scheduled to be trained using PyTorch on CPU, is it possible to add additional GPU machine with to speed up training of certain layers? Does PyTorch allow such mixed setup? If not, ...
0
votes
0answers
13 views

Descent Training episodes for LSTM + TD3

I am building an AI with TD3 and lstm in both actor and critic. By LSTM size is 5,5 with 3 layers and hidden layers with 400 and 300 neurons respectively. I have states dimension of 5 with each value ...
0
votes
0answers
20 views

TD3+lstm predicting the same output for varying states

I have a model with TD3 + lstm in both actor and critic. I am trying to make it learn to predict some specific actions based on the environment conditions. However i see that the AI predicts very ...
0
votes
1answer
57 views

Is it possible to have a fixed trajectory size in the vanilla policy gradient algorithm?

In the concept of the vanilla policy gradient algorithm, is it possible for our trajectory size to be fixed? For example, my environment is the space of embedded images (using a pre-trained encoder to ...
0
votes
0answers
25 views

How do I get my DCGAN to generate a number of fake images?

I have a Deep Convolutional Generative Adversarial Network (DCGAN) that trains on the CIFAR dataset. When I finish the training (100k epochs), how can I make my network generate 1000 fake images? I ...
0
votes
1answer
46 views

Input tensor shape order for RNN (PyTorch)

I am confused as to why the sequence length is the first dimension of the input tensor for an RNN when batch size is the first dimension for any other kind of network (Linear/CNN/etc.). This makes me ...
0
votes
1answer
69 views

Can you train Transformers sequentially?

I’m currently trying to train a BART, which is a denoising Transformer created by Facebook researchers. Here’s my Transformer code ...
0
votes
0answers
22 views

Which hidden state should I use for a trajectory when incorporating LSTM into RL?

I'm trying to wrap my head around using LSTM in an RL algorithm like actor-critic or PPO. I've found this Github code which presents this in a very simple manner, however I have a very limited ...
0
votes
0answers
88 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 ...
0
votes
1answer
86 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 ...