Questions tagged [torch]
The torch tag has no usage guidance.
16
questions
0
votes
0answers
24 views
Save and Load Simple Transformer Model
I have trained Text classifier using simpleTranformer.ai I am struggling to save and load the model in docker container. Please let me know how can I save the trained model and then load it into ...
0
votes
1answer
16 views
Torch tensor view and stride mechanics
I want my Mx2xN float tensor to become MxN complex tensor.
In this minimal example I supply the the 10x2 matrix which should become the vector [0+10j,1+11j,2+12k,...]
...
0
votes
1answer
37 views
Why does my GPU immediately run out of memory when I try to run this code?
I am trying to write a neural network that will train on plays by Shakespeare and then write its own passages. I am using pytorch. For some reason, my GPU ...
2
votes
1answer
64 views
How to specify version for dependencies so that each one is compatible and stays within a size limit?
I am trying to deploy a web app to Heroku. The free tier is limited to 500 MB.
I am using my resnet34 model as a .pkl file.
I create model with it using the fastai ...
1
vote
0answers
112 views
Why does the learning rate influence whether i get a error from BCE or not? [closed]
When I use a learning rate higher than 0.001, I get this:
Assertion `input_val >= zero && input_val <= one` failed.
This means that the input I gave ...
2
votes
0answers
359 views
how to implement squared hinge loss in pytorch
does anyone have any advice on how to implement this loss in order to use it with a convolutional neural network?
Also, how should I encode the labels of my training data? We were using one hot ...
2
votes
1answer
113 views
Colab can not connect to GPU from a python file [closed]
I am trying to run a github deep learning repository in Colab but I can not connect the python files to colab GPU.
I can connect to GPU when writing a script in the colab notebook e.g. when I run ...
1
vote
0answers
61 views
Write way to add samples to torch TabularDataset
I have a TabularDataset and i would like to add some examples to the dataset.
...
1
vote
0answers
55 views
Replacing VGG by LeNet Caffe model
this code works with a VGG caffe model (VGG_ILSVRC_19_layers.caffemodel).
When I tried to change the model to a LeNet caffemodel (below the prototxt file), I got the following error.
In 6 module of ...
2
votes
1answer
4k views
Does torch.cat work with backpropagation?
I was wondering if it was okay to use torch.cat within my forward function. I am doing so because I want the first two columns of my input to skip the middle hidden layers and go directly to the final ...
1
vote
1answer
51 views
No loss decay while learning Neural Network for X-OR operation in torch
I have implemented a simple 1 hidden layer feed forward neural network in torch to learn X-OR operation. Below is my code:
...
1
vote
1answer
109 views
Neural network accuracy in Torch depends on compute power?
I am new to machine learning and have quite good understanding of basic concepts.
I was implementing a 3 Layer neural network on MNIST dataset with 784, 100, 10 neurons in input, hidden, output layer ...
1
vote
1answer
273 views
Torch on Gentoo
Has anyone tried to install Torch on top of Gentoo Linux Distribution?
I'm very familiar with this distribution, but I'm totally new at torch. Googling a little, I found that Gentoo is not officially ...
1
vote
1answer
102 views
Unable to figure out nInputPlane in SpatialConvolution in torch?
Documentaion for Spatial Convolution define it as
module = nn.SpatialConvolution(nInputPlane, nOutputPlane, kW, kH, [dW], [dH], [padW], [padH])
nInputPlane: The ...
6
votes
2answers
3k views
How to handle Memory issues in training Word Embeddings on Large Datasets?
I want to train a word predictability task to generate word embeddings. The document collection contains 243k documents. The code implementation is in torch. I am struggling with the huge size of the ...
1
vote
0answers
299 views
Multi-GPU, multi-machine computation with Torch
I know that Torch supports multi-GPU computation on the same machine (Example).
Is it possible to perform multi-GPU, multi-machine computations with Torch?