New answers tagged

0 votes

How to make an ensemble model for classification with pytorch using trained models?

From your code snippet, my best guess is that the cpu and cuda:0 error does not mean your 2 models but input data x and ...
user avatar
  • 1
1 vote
Accepted

In LSTM why h_t output twice?

ht was initially defined as a differential function, which value is the same in output and in the next LSTM cell. LSTM uses the previous steps in a sequential way and chooses whether to memorize or ...
user avatar
1 vote

How to reduce the size of Bert model(checkpoint/model_state.bin) using pytorch

Are you reusing an existing Bert model or are you training it from scratch? In all the cases, you can apply several solutions to your model: Use distill Bert instead Pruning Freezing Convert it to ...
user avatar
0 votes

What is the right Pytorch RNN implementation?

nn.Linear should already learn an additive bias by default. This example implements RNN with no activation likely just for educational purposes, since that makes no ...
user avatar
  • 156
1 vote
Accepted

Would writing a decision tree algorithm in Pytorch or Tensorflow be faster than with Numpy?

Not directly, mostly because the structure of a decision tree doesn't lend itself to GPU parallelisation, and is better suited to CPUs. Even the most established decision tree algorithms use CPUs. ...
user avatar
  • 274
1 vote
Accepted

BertTokenizer Loading Problem

It could be due to an internet connection issue, that's why it is always safer to download your model in a local folder first and then load it directly using the absolute path. In addition to that ...
user avatar
0 votes

Why is the type of pytorch MSELoss class 'type'?

it is because you haven't instantiated the object, add () after the name of the class ...
user avatar

Top 50 recent answers are included