<p>For those who happened to come across my question, I solved my problem.</p>
<p>After training the model, I initiated the network with the trained parameters (weights). Then as I have a loaded model, I removed the last output neurons, which was 4 ea. and I added 345 neurons.</p>
<p>Afterwards, I froze the all neurons's weights except the last last layer of 345 and trained the model again to adjust last added weights.</p>
<p>Then voila!</p>

CC BY-SA 4.0
2023-04-12T05:31:54.690Z
2023-04-12T05:31:54.690Z
T.Gulez
<p>I am trying to apply a self supervised task as stated in this github repo.<a href="https://github.com/zzz1515151/self-supervised_learning_sketch" rel="nofollow noreferrer">The Self-Supervised Sketch Recognition</a></p>
<p>In this work, authors are using 345.000 image samples to train the model and the dataset is constructed by rotating the images in 0/90/180/270 degrees. So the number of classes is 4.</p>
<p>When I train the model, I can get the best model recorded as the best epoch with the above parameters. (Alexnet is used in training with *.png files)</p>
<p>Then I need to apply this model and weights to <strong>downstream tasks</strong>, where there are 345 different classes. (But the trained model is with 4 classes) I know they do not need to be the same but I am confused how to make transfer learning..</p>
<p>Should I train the model again with the weights I received in pretext tasks? Or what should I do? Any reference or sample project is greatly welcome.</p>
<p>Thanks in advance...</p>

<transfer-learning><self-supervised-learning><pretext-tasks>
Self Supervised Learning Application of trained model... A bit confused
T.Gulez
# Self Supervised Learning Application of trained model... A bit confused

(Asked by: username_0 on 2023-04-10)

I am trying to apply a self supervised task as stated in this github repo.[The Self-Supervised Sketch Recognition](https://github.com/zzz1515151/self-supervised_learning_sketch)

In this work, authors are using 345.000 image samples to train the model and the dataset is constructed by rotating the images in 0/90/180/270 degrees. So the number of classes is 4.

When I train the model, I can get the best model recorded as the best epoch with the above parameters. (Alexnet is used in training with \*.png files)

Then I need to apply this model and weights to **downstream tasks**, where there are 345 different classes. (But the trained model is with 4 classes) I know they do not need to be the same but I am confused how to make transfer learning..

Should I train the model again with the weights I received in pretext tasks? Or what should I do? Any reference or sample project is greatly welcome.

Thanks in advance...

**Tags:** transfer-learning, self-supervised-learning, pretext-tasks


---

## 1 answers

### Answer by username_0 on 2023-04-12. Score: 0 | Accepted answer

For those who happened to come across my question, I solved my problem.

After training the model, I initiated the network with the trained parameters (weights). Then as I have a loaded model, I removed the last output neurons, which was 4 ea. and I added 345 neurons.

Afterwards, I froze the all neurons's weights except the last last layer of 345 and trained the model again to adjust last added weights.

Then voila!


---

