REduce capacity of a model

username: Samiha
cooked: <p>I am trying to run a deep learning model written in pytorch. since I am trying in my laptop I only able to run  about 20 frames. Can anyone please tell how can I input 20 frames of a video dataset instead of the whole of it?<br>
I also have 2 .pth files in the model. Do these need to be modified? Here is the code</p>
<aside class="onebox whitelistedgeneric">
  <header class="source">
      <img src="https://github.githubassets.com/favicon.ico" class="site-icon" width="32" height="32">
      <a href="https://github.com/foolwood/SiamMask/" target="_blank" rel="nofollow noopener">GitHub</a>
  </header>
  <article class="onebox-body">
    <img src="https://avatars3.githubusercontent.com/u/11716717?s=400&amp;v=4" class="thumbnail onebox-avatar" width="400" height="400">

<h3><a href="https://github.com/foolwood/SiamMask/" target="_blank" rel="nofollow noopener">foolwood/SiamMask</a></h3>

<p>[CVPR2019] Fast Online Object Tracking and Segmentation: A Unifying Approach - foolwood/SiamMask</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


username: ptrblck
cooked: <aside class="quote no-group" data-username="Samiha" data-post="1" data-topic="62561">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/ba9def/48.png" class="avatar"> Samiha:</div>
<blockquote>
<p>since I am trying in my laptop I only able to run about 20 frames.</p>
</blockquote>
</aside>
<p>Is this due to some memory limitation? Would you like to process 20 frames in each batch?</p>
<aside class="quote no-group" data-username="Samiha" data-post="1" data-topic="62561">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/ba9def/48.png" class="avatar"> Samiha:</div>
<blockquote>
<p>Can anyone please tell how can I input 20 frames of a video dataset instead of the whole of it?</p>
</blockquote>
</aside>
<p>How are you loading your data so far?<br>
If you are using a custom <code>Dataset</code>, limiting the length should be easy, as you would only have to return the reduced number in <code>__len__(self)</code>.</p>
<aside class="quote no-group" data-username="Samiha" data-post="1" data-topic="62561">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/ba9def/48.png" class="avatar"> Samiha:</div>
<blockquote>
<p>I also have 2 .pth files in the model. Do these need to be modified?</p>
</blockquote>
</aside>
<p>What do these files contain?</p>
<p>You would need to provide some more information about the use case, what you have done so far, and where you are stuck currently.</p>

username: Samiha
cooked: <p>I just followed the steps written to execute demo.py and I have not added anything to the code. Yes I want to input a video with 20 frames. Yes this is due to memory limitation and I am using DAVIS and VOTdatasets. These .pth files were included in the code.</p>
<p>when I execute this command<br>
python …/…/tools/demo.py --resume SiamMask_DAVIS.pth --config config_davis.json</p>
<p>only an image is the output without the mask and bounding box and the following shows. Please help me how to fix this-</p>
<p>[2019-11-30 18:24:53,146-rk0-features.py# 66] Current training 0 layers:</p>
<p>[2019-11-30 18:24:53,148-rk0-features.py# 66] Current training 1 layers:</p>
<p>[2019-11-30 18:24:53,279-rk0-load_helper.py# 31] load pretrained model from SiamMask_DAVIS.pth<br>
[2019-11-30 18:24:57,895-rk0-load_helper.py# 25] remove prefix ‘module.’<br>
[2019-11-30 18:24:57,899-rk0-load_helper.py# 18] used keys:356</p>
<p>I am trying this code</p>
<aside class="onebox whitelistedgeneric">
  <header class="source">
      <img src="https://github.githubassets.com/favicon.ico" class="site-icon" width="32" height="32">
      <a href="https://github.com/foolwood/SiamMask/" target="_blank" rel="nofollow noopener">GitHub</a>
  </header>
  <article class="onebox-body">
    <img src="https://avatars3.githubusercontent.com/u/11716717?s=400&amp;v=4" class="thumbnail onebox-avatar" width="400" height="400">

<h3><a href="https://github.com/foolwood/SiamMask/" target="_blank" rel="nofollow noopener">foolwood/SiamMask</a></h3>

<p>[CVPR2019] Fast Online Object Tracking and Segmentation: A Unifying Approach - foolwood/SiamMask</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


username: ptrblck
cooked: <p>Sorry, I’m not familiar with the code base and think you might get a better answer, if you ask in the repository directly.</p>

username: Samiha
cooked: <p>I have done that. Before I get any solution from there, could you please tell what actually .pth files contain?  What could be the reason behind getting  <strong>“load pretrained model from SiamMask_DAVIS.pth”, “remove prefix ‘module.’”, " used keys:356"</strong> error messages?</p>