New answers tagged

0

Since you want to save the training min/max and use those to replace inf's in the test set, you need a custom transformer. To build a robust transformer, you should use some of sklearn's validation functions. And it's best to work in numpy, since as you point out an earlier transformer in a pipeline will have already converted an input dataframe to an ...


1

Now, if I deploy this model (i.e., use this model to make predictions), does it keep learning (i.e., updating the Q values)? If you want it to (and understand how to code it) then yes a reinforcement agent - including a DQN-based one - can do this. This is online learning, and is possible also with many supervised learning techniques. Because there is risk ...


0

Think of it this way, in supervised learning you would train the model on training set, maybe even the validation set once you are sure it's not overfitting. But, would you ever train it on the data predicted by the model on test set? NO. The predictions are never 100% accurate and training on it reduces the accuracy of the model. Same goes for Reinforcement ...


1

Maybe the distribution of the validation data is not similar to the training data, and therefore the training signal does not lead the model to perform well on the validation data. The key point here is therefore: how did you split the data into training and validation?


1

To save a model's state, it is enough to save the model's parameters. If you are using Torch, then you can save it as follows torch.save(model.state_dict(), path_to_save). When you want to resume training with a saved model, you would have to first create the model instance, and then you can use model.load_state_dict(torch.load(path_of_saved_model)) to ...


0

As you said: Is it possible to preprocess the data in batches and train a model for the small data set Yes! In practice, training of Neural Networks always happens with batches. You never fit the whole dataset at once in the model, whatever medium sized dataset could crash any machine. This is how it works: You extract a slice of your dataframe (the ...


1

From your description, it seems that you are not shuffling your training data. You should shuffle your data, and do it differently at every epoch. Once the data is shuffled, you should not see the behavior you describe.


1

Have you already plotted the training and validation loss over multiple epochs? What you would expect is something that looks like an exponential decay. Chances are your models learns the mean of the target variable in the first few batches, which reduces the MSE-loss already considerably and only later learns the subtle differences in your data. You can ...


1

I would recommend not to downsample the validation set. In the end you care about performance on the test set with the skewed class distribution. Therefore your validation set (used for hyperparameter selection, early stopping etc.) should have the same distribution in my opinion. Have you considered upsampling the minority class? By downsampling you loose ...


0

Are you in fact using the same architecture as they are? If not that could potentially be the problem. Otherwise, are you using the same trainings protocol as they, i.e. optimizer, learning rate, learning rate schedule, batch size, preprocessing, weight initialization, number of training epochs? Depending on the size of your model and the amount of training ...


1

I cannot say for sure, but it seems that it might be an error in the printout. The validation loss doesn't seem to spike, so it seems that the loss may not actually be what is printed. I can only advise to run training multiple times and see if this happens again. If yes, try toying with the learning rate. There is a small chance that the learning rate ...


0

Overfitting is a result of the entire model. It is best to visualize every part of the model to understand how the combination of elements is overfitting. Ideally, you should visualize all elements on the same interactive figure so how the combination is overfitting. If that is not possible or the interpretation is difficult, then many single element ...


0

When should you re-train? Theoretically, a model will only degrade (become outdated and no longer useful) if the system you are modelling or the nature of the data has changed. Ideally you can spot this by setting up automated monitoring of the model in production. This could mean that predictions on new incoming data will be compared with the ground-truth ...


0

So here is my thought. I suggest you do some sort of clustering of images. It is okay if it is not a robust one. use any pre-trained model architecture of Inception which has been trained on huge corpus. Freeze the layers and take the feature encodings on the images by passing them through the inception model (Output of FC layer) apply pca and ...


1

I suggest you to use as much data as possible. If the images are coming from two different cameras, it could be an original way to fight overfitting. I would use both datasets, and operate a train-validation-test split that is transversal to both. Additionally, since the dataset is small, I strongly enourage you to use lots and lots of data augmentation, ...


1

Yes, they don’t reset it. They train on the same set of weights continuously. An epoch means the model completed training on the entire dataset once. The loss is smaller because the model improves.


1

How is it that when starting the next epoch, the loss is almost always smaller than the first one? Does this mean that after an epoch the weights of the neural network are not reset? Yes. The network weights are initialized once before the training starts. After every iteration, the weights are updated by backpropagation using the error gradients that you ...


2

An epoch is not a standalone training process, so no, the weights are not reset after an epoch is complete. Epochs are merely used to keep track of how much data has been used to train the network. It's a way to represent how much "work" has been done. Epochs are used to compare how "long" it would take to train a certain network regardless of hardware. ...


Top 50 recent answers are included