Questions about fine tunning in faster RCNN

username: Miguel_Campos
cooked: <p>Hi familiy.<br>
I am following the tutorial from oficial pytorch website, where teaches how to fine tunning with mask-rcnn<br>
<a href="https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html" class="onebox" target="_blank" rel="noopener nofollow ugc">https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html</a></p>
<p>I have a question in the Main function (which is little down below).<br>
You will see this code</p>
<blockquote>
<pre><code>params = [p for p in model.parameters() if p.requires_grad]
</code></pre>
</blockquote>
<p>As far i know, when we need do fine tuning classification models (like VG 16), we freeze every layer except the last one. Why here we use this code?</p>
<p>I have already readed the official paper of the faster-rcnn where it described until 3 different ways to train this architecture</p>
<p>Please i will appreciate any explication <img src="https://discuss.pytorch.org/images/emoji/apple/smiley.png?v=12" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p>
<p>PDT: this is my first project with this kind of architecture</p>

username: ptrblck
cooked: <p>This line of code stores all parameters, which require gradients and will thus be trained, into a list.<br>
This list is then passed to the optimizer. You could also pass all parameters to the optimizer and let the check internally, if valid gradients were calculated for each parameter or if this parameter should be skipped.</p>
<p>The posted code snippet is a good way to write explicit code in my opinion.</p>

username: Miguel_Campos
cooked: <p>Thanks for your answer, i appreciate i too much but my doubt hasnt been solved yet <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=12" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>After of reading the oficial Faster RCNN paper<br>
The documents describe 3 different methods<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/4/741cb2653debbd7d629f89ac7fd059ce207c10b2.png" data-download-href="https://discuss.pytorch.org/uploads/default/741cb2653debbd7d629f89ac7fd059ce207c10b2" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/7/4/741cb2653debbd7d629f89ac7fd059ce207c10b2.png" alt="image" data-base62-sha1="gzaRTBO6hWLyJbL3j7va3yK4JEe" width="290" height="500" data-dominant-color="E0E0C2"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">341×587 64.8 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>The method that did you explained me is one of the training method explained in the paper?<br>
If not, why Pytorch is using this method of training?</p>
<p>Sorry whether i am asking something trivial but now i am in a point where i beginning to understand lot of things (and questions come)</p>