Model keep training none stop

username: Archy_dragon
cooked: <p>Hi i try to train data so i make small batch to train for time effieient and now my model wont stop training even the batch size it go over batch size can anyone check</p>
<pre><code class="lang-auto">def train111(dataloader,net): 
      net = load_net(net, 'gpu')
      net = net.cuda()
      model_name=args.model_name
      

      features = None
  
      epoch = 1
      criterion = nn.CrossEntropyLoss()
      optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9)
      train_loss = list()
      for i in range (epoch ):
      #set_trace()
        for i, data in enumerate(test):
        
          inps, labs = data
          inps, labs = inps.cuda(args['device']), labs.cuda(args['device'])

          inps = Variable(inps).cuda(args['device'])
          labs = Variable(labs).cuda(args['device'])
          optimizer.zero_grad()
          outs = net(inps.permute(0, 3, 1, 2).float())
          soft_outs = F.softmax(outs, dim=1)
          prds = soft_outs.data.max(1)[1]
          loss = criterion(outs, labs)
          loss.backward()
          optimizer.step()
          prds = prds.cpu().numpy()
          inps_np = inps.detach().cpu().numpy()
          labs_np = labs.detach().cpu().numpy()
          train_loss.append(loss.data.item
                        ())
        
          print('[epoch %d], [iter %d / %d], [train loss %.5f]' % (epoch, i + 1, len(dataloader), np.asarray(train_loss).mean()))
        return net
</code></pre>
<pre><code class="lang-auto">model_trained111=train111(dataloader,net='mobilefacenet')```

</code></pre>
<p>/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/first_stage.py:32: UserWarning: volatile was removed and now has no effect. Use <code>with torch.no_grad():</code> instead.<br>
img = Variable(torch.FloatTensor(_preprocess(img)), volatile=True)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/first_stage.py:32: UserWarning: volatile was removed and now has no effect. Use <code>with torch.no_grad():</code> instead.<br>
img = Variable(torch.FloatTensor(_preprocess(img)), volatile=True)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/get_nets.py:74: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.<br>
a = F.softmax(a)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/get_nets.py:74: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.<br>
a = F.softmax(a)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/detector.py:79: UserWarning: volatile was removed and now has no effect. Use <code>with torch.no_grad():</code> instead.<br>
img_boxes = Variable(torch.FloatTensor(img_boxes), volatile=True)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/detector.py:79: UserWarning: volatile was removed and now has no effect. Use <code>with torch.no_grad():</code> instead.<br>
img_boxes = Variable(torch.FloatTensor(img_boxes), volatile=True)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/get_nets.py:120: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.<br>
a = F.softmax(a)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/detector.py:100: UserWarning: volatile was removed and now has no effect. Use <code>with torch.no_grad():</code> instead.<br>
img_boxes = Variable(torch.FloatTensor(img_boxes), volatile=True)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/get_nets.py:120: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.<br>
a = F.softmax(a)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/detector.py:100: UserWarning: volatile was removed and now has no effect. Use <code>with torch.no_grad():</code> instead.<br>
img_boxes = Variable(torch.FloatTensor(img_boxes), volatile=True)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/get_nets.py:174: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.<br>
a = F.softmax(a)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/matlab_cp2tform.py:312: FutureWarning: <code>rcond</code> parameter will change to the default of machine precision times <code>max(M, N)</code> where M and N are the input matrix dimensions.<br>
To use the future default and silence this warning we advise to pass <code>rcond=None</code>, to keep using the old, explicitly pass <code>rcond=-1</code>.<br>
r, _, _, _ = lstsq(X, U)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/mtcnn_network/get_nets.py:174: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.<br>
a = F.softmax(a)<br>
/content/drive/My Drive/recfaces13/recfaces/preprocessing/matlab_cp2tform.py:312: FutureWarning: <code>rcond</code> parameter will change to the default of machine precision times <code>max(M, N)</code> where M and N are the input matrix dimensions.<br>
To use the future default and silence this warning we advise to pass <code>rcond=None</code>, to keep using the old, explicitly pass <code>rcond=-1</code>.<br>
r, _, _, _ = lstsq(X, U)<br>
[epoch 1], [iter 1 / 46], [train loss 5.15882]<br>
[epoch 1], [iter 2 / 46], [train loss 5.64264]<br>
[epoch 1], [iter 3 / 46], [train loss 5.46005]<br>
[epoch 1], [iter 4 / 46], [train loss 5.38127]<br>
[epoch 1], [iter 5 / 46], [train loss 5.34429]<br>
[epoch 1], [iter 6 / 46], [train loss 5.47624]<br>
[epoch 1], [iter 7 / 46], [train loss 5.56407]<br>
[epoch 1], [iter 8 / 46], [train loss 5.63598]<br>
[epoch 1], [iter 9 / 46], [train loss 5.69084]<br>
[epoch 1], [iter 10 / 46], [train loss 5.63928]<br>
[epoch 1], [iter 11 / 46], [train loss 5.68155]<br>
[epoch 1], [iter 12 / 46], [train loss 5.71656]<br>
[epoch 1], [iter 13 / 46], [train loss 5.67577]<br>
[epoch 1], [iter 14 / 46], [train loss 5.70586]<br>
[epoch 1], [iter 15 / 46], [train loss 5.67221]<br>
[epoch 1], [iter 16 / 46], [train loss 5.64174]<br>
[epoch 1], [iter 17 / 46], [train loss 5.67100]<br>
[epoch 1], [iter 18 / 46], [train loss 5.69577]<br>
[epoch 1], [iter 19 / 46], [train loss 5.72008]<br>
[epoch 1], [iter 20 / 46], [train loss 5.69191]<br>
[epoch 1], [iter 21 / 46], [train loss 5.71233]<br>
[epoch 1], [iter 22 / 46], [train loss 5.73129]<br>
[epoch 1], [iter 23 / 46], [train loss 5.74838]<br>
[epoch 1], [iter 24 / 46], [train loss 5.76361]<br>
[epoch 1], [iter 25 / 46], [train loss 5.73821]<br>
[epoch 1], [iter 26 / 46], [train loss 5.75314]<br>
[epoch 1], [iter 27 / 46], [train loss 5.76676]<br>
[epoch 1], [iter 28 / 46], [train loss 5.77762]<br>
[epoch 1], [iter 29 / 46], [train loss 5.75498]<br>
[epoch 1], [iter 30 / 46], [train loss 5.76636]<br>
[epoch 1], [iter 31 / 46], [train loss 5.77630]<br>
[epoch 1], [iter 32 / 46], [train loss 5.75762]<br>
[epoch 1], [iter 33 / 46], [train loss 5.76676]<br>
[epoch 1], [iter 34 / 46], [train loss 5.77716]<br>
[epoch 1], [iter 35 / 46], [train loss 5.78547]<br>
[epoch 1], [iter 36 / 46], [train loss 5.79422]<br>
[epoch 1], [iter 37 / 46], [train loss 5.80273]<br>
[epoch 1], [iter 38 / 46], [train loss 5.78626]<br>
[epoch 1], [iter 39 / 46], [train loss 5.79541]<br>
[epoch 1], [iter 40 / 46], [train loss 5.80404]<br>
[epoch 1], [iter 41 / 46], [train loss 5.81178]<br>
[epoch 1], [iter 42 / 46], [train loss 5.81857]<br>
[epoch 1], [iter 43 / 46], [train loss 5.80177]<br>
[epoch 1], [iter 44 / 46], [train loss 5.78725]<br>
[epoch 1], [iter 45 / 46], [train loss 5.79483]<br>
[epoch 1], [iter 46 / 46], [train loss 5.78104]<br>
[epoch 1], [iter 47 / 46], [train loss 5.78869]<br>
[epoch 1], [iter 48 / 46], [train loss 5.79372]<br>
[epoch 1], [iter 49 / 46], [train loss 5.79849]<br>
[epoch 1], [iter 50 / 46], [train loss 5.80376]<br>
[epoch 1], [iter 51 / 46], [train loss 5.79099]<br>
[epoch 1], [iter 52 / 46], [train loss 5.77731]<br>
[epoch 1], [iter 53 / 46], [train loss 5.78287]<br>
[epoch 1], [iter 54 / 46], [train loss 5.78853]<br>
[epoch 1], [iter 55 / 46], [train loss 5.79395]<br>
[epoch 1], [iter 56 / 46], [train loss 5.78287]<br>
[epoch 1], [iter 57 / 46], [train loss 5.77262]<br>
[epoch 1], [iter 58 / 46], [train loss 5.77720]<br>
[epoch 1], [iter 59 / 46], [train loss 5.78294]<br>
[epoch 1], [iter 60 / 46], [train loss 5.78791]<br>
[epoch 1], [iter 61 / 46], [train loss 5.79308]<br>
[epoch 1], [iter 62 / 46], [train loss 5.79769]<br>
[epoch 1], [iter 63 / 46], [train loss 5.80310]<br>
[epoch 1], [iter 64 / 46], [train loss 5.79319]<br>
[epoch 1], [iter 65 / 46], [train loss 5.79729]<br>
[epoch 1], [iter 66 / 46], [train loss 5.80313]<br>
[epoch 1], [iter 67 / 46], [train loss 5.80592]<br>
[epoch 1], [iter 68 / 46], [train loss 5.79605]<br>
[epoch 1], [iter 69 / 46], [train loss 5.80102]<br>
[epoch 1], [iter 70 / 46], [train loss 5.80570]<br>
[epoch 1], [iter 71 / 46], [train loss 5.79511]<br>
[epoch 1], [iter 72 / 46], [train loss 5.79935]<br>
[epoch 1], [iter 73 / 46], [train loss 5.78910]<br>
[epoch 1], [iter 74 / 46], [train loss 5.78059]<br>
[epoch 1], [iter 75 / 46], [train loss 5.78466]<br>
[epoch 1], [iter 76 / 46], [train loss 5.77719]<br>
[epoch 1], [iter 77 / 46], [train loss 5.78120]<br>
[epoch 1], [iter 78 / 46], [train loss 5.77163]<br>
[epoch 1], [iter 79 / 46], [train loss 5.76362]<br>
[epoch 1], [iter 80 / 46], [train loss 5.75510]<br>
[epoch 1], [iter 81 / 46], [train loss 5.74679]<br>
[epoch 1], [iter 82 / 46], [train loss 5.73946]<br>
[epoch 1], [iter 83 / 46], [train loss 5.73348]<br>
[epoch 1], [iter 84 / 46], [train loss 5.72493]<br>
[epoch 1], [iter 85 / 46], [train loss 5.71860]<br>
[epoch 1], [iter 86 / 46], [train loss 5.71163]<br>
[epoch 1], [iter 87 / 46], [train loss 5.71607]<br>
[epoch 1], [iter 88 / 46], [train loss 5.70995]<br>
[epoch 1], [iter 89 / 46], [train loss 5.71393]<br>
[epoch 1], [iter 90 / 46], [train loss 5.70843]<br>
[epoch 1], [iter 91 / 46], [train loss 5.71228]<br>
[epoch 1], [iter 92 / 46], [train loss 5.71657]<br>
[epoch 1], [iter 93 / 46], [train loss 5.71108]<br>
[epoch 1], [iter 94 / 46], [train loss 5.71473]<br>
[epoch 1], [iter 95 / 46], [train loss 5.70708]<br>
[epoch 1], [iter 96 / 46], [train loss 5.70132]<br>
[epoch 1], [iter 97 / 46], [train loss 5.69389]<br>
[epoch 1], [iter 98 / 46], [train loss 5.69753]<br>
[epoch 1], [iter 99 / 46], [train loss 5.70153]<br>
[epoch 1], [iter 100 / 46], [train loss 5.69501]<br>
[epoch 1], [iter 101 / 46], [train loss 5.69840]<br>
[epoch 1], [iter 102 / 46], [train loss 5.69200]<br>
[epoch 1], [iter 103 / 46], [train loss 5.69525]<br>
[epoch 1], [iter 104 / 46], [train loss 5.69976]<br>
[epoch 1], [iter 105 / 46], [train loss 5.70278]<br>
[epoch 1], [iter 106 / 46], [train loss 5.69645]<br>
[epoch 1], [iter 107 / 46], [train loss 5.69948]<br>
[epoch 1], [iter 108 / 46], [train loss 5.70323]<br>
[epoch 1], [iter 109 / 46], [train loss 5.70620]<br>
[epoch 1], [iter 110 / 46], [train loss 5.70145]<br>
[epoch 1], [iter 111 / 46], [train loss 5.70460]<br>
[epoch 1], [iter 112 / 46], [train loss 5.69942]<br>
[epoch 1], [iter 113 / 46], [train loss 5.69274]<br>
[epoch 1], [iter 114 / 46], [train loss 5.69612]<br>
[epoch 1], [iter 115 / 46], [train loss 5.69888]<br>
[epoch 1], [iter 116 / 46], [train loss 5.70156]<br>
[epoch 1], [iter 117 / 46], [train loss 5.70410]<br>
[epoch 1], [iter 118 / 46], [train loss 5.70744]<br>
[epoch 1], [iter 119 / 46], [train loss 5.71084]<br>
[epoch 1], [iter 120 / 46], [train loss 5.71319]<br>
[epoch 1], [iter 121 / 46], [train loss 5.70873]<br>
[epoch 1], [iter 122 / 46], [train loss 5.70469]<br>
[epoch 1], [iter 123 / 46], [train loss 5.69845]<br>
[epoch 1], [iter 124 / 46], [train loss 5.70074]<br>
[epoch 1], [iter 125 / 46], [train loss 5.69645]<br>
[epoch 1], [iter 126 / 46], [train loss 5.69209]<br>
[epoch 1], [iter 127 / 46], [train loss 5.69522]<br>
[epoch 1], [iter 128 / 46], [train loss 5.69079]<br>
[epoch 1], [iter 129 / 46], [train loss 5.68628]<br>
[epoch 1], [iter 130 / 46], [train loss 5.68197]<br>
[epoch 1], [iter 131 / 46], [train loss 5.67804]<br>
[epoch 1], [iter 132 / 46], [train loss 5.68139]<br>
[epoch 1], [iter 133 / 46], [train loss 5.68444]<br>
[epoch 1], [iter 134 / 46], [train loss 5.68102]<br>
[epoch 1], [iter 135 / 46], [train loss 5.68393]<br>
[epoch 1], [iter 136 / 46], [train loss 5.67883]<br>
[epoch 1], [iter 137 / 46], [train loss 5.67466]<br>
[epoch 1], [iter 138 / 46], [train loss 5.66967]<br>
[epoch 1], [iter 139 / 46], [train loss 5.66591]<br>
[epoch 1], [iter 140 / 46], [train loss 5.66917]<br>
[epoch 1], [iter 141 / 46], [train loss 5.67119]<br>
[epoch 1], [iter 142 / 46], [train loss 5.67408]<br>
[epoch 1], [iter 143 / 46], [train loss 5.67000]<br>
[epoch 1], [iter 144 / 46], [train loss 5.67191]<br>
[epoch 1], [iter 145 / 46], [train loss 5.67482]<br>
[epoch 1], [iter 146 / 46], [train loss 5.67665]<br>
[epoch 1], [iter 147 / 46], [train loss 5.67898]<br>
[epoch 1], [iter 148 / 46], [train loss 5.67415]<br>
[epoch 1], [iter 149 / 46], [train loss 5.67052]<br>
[epoch 1], [iter 150 / 46], [train loss 5.66731]<br>
[epoch 1], [iter 151 / 46], [train loss 5.66909]<br>
[epoch 1], [iter 152 / 46], [train loss 5.66538]<br>
[epoch 1], [iter 153 / 46], [train loss 5.66711]<br>
[epoch 1], [iter 154 / 46], [train loss 5.66880]<br>
[epoch 1], [iter 155 / 46], [train loss 5.67044]<br>
[epoch 1], [iter 156 / 46], [train loss 5.67296]<br>
[epoch 1], [iter 157 / 46], [train loss 5.67545]<br>
[epoch 1], [iter 158 / 46], [train loss 5.67231]<br>
[epoch 1], [iter 159 / 46], [train loss 5.67474]<br>
[epoch 1], [iter 160 / 46], [train loss 5.67156]<br>
[epoch 1], [iter 161 / 46], [train loss 5.66820]<br>
[epoch 1], [iter 162 / 46], [train loss 5.66953]<br>
[epoch 1], [iter 163 / 46], [train loss 5.66623]<br>
[epoch 1], [iter 164 / 46], [train loss 5.66320]<br>
[epoch 1], [iter 165 / 46], [train loss 5.66583]<br>
[epoch 1], [iter 166 / 46], [train loss 5.66854]<br>
[epoch 1], [iter 167 / 46], [train loss 5.67105]<br>
[epoch 1], [iter 168 / 46], [train loss 5.67362]<br>
[epoch 1], [iter 169 / 46], [train loss 5.66926]<br>
[epoch 1], [iter 170 / 46], [train loss 5.66649]<br>
[epoch 1], [iter 171 / 46], [train loss 5.66757]<br>
[epoch 1], [iter 172 / 46], [train loss 5.66978]<br>
[epoch 1], [iter 173 / 46], [train loss 5.66536]<br>
[epoch 1], [iter 174 / 46], [train loss 5.66098]<br>
[epoch 1], [iter 175 / 46], [train loss 5.66350]<br>
[epoch 1], [iter 176 / 46], [train loss 5.66082]<br>
[epoch 1], [iter 177 / 46], [train loss 5.66255]<br>
[epoch 1], [iter 178 / 46], [train loss 5.66390]<br>
[epoch 1], [iter 179 / 46], [train loss 5.66050]<br>
[epoch 1], [iter 180 / 46], [train loss 5.66142]<br>
[epoch 1], [iter 181 / 46], [train loss 5.65733]<br>
[epoch 1], [iter 182 / 46], [train loss 5.65963]<br>
[epoch 1], [iter 183 / 46], [train loss 5.66245]<br>
[epoch 1], [iter 184 / 46], [train loss 5.66491]<br>
[epoch 1], [iter 185 / 46], [train loss 5.66181]<br>
[epoch 1], [iter 186 / 46], [train loss 5.65937]<br>
[epoch 1], [iter 187 / 46], [train loss 5.65667]<br>
[epoch 1], [iter 188 / 46], [train loss 5.65498]<br>
[epoch 1], [iter 189 / 46], [train loss 5.65703]<br>
[epoch 1], [iter 190 / 46], [train loss 5.65468]<br>
[epoch 1], [iter 191 / 46], [train loss 5.65216]<br>
[epoch 1], [iter 192 / 46], [train loss 5.64964]<br>
[epoch 1], [iter 193 / 46], [train loss 5.64714]<br>
[epoch 1], [iter 194 / 46], [train loss 5.64469]<br>
[epoch 1], [iter 195 / 46], [train loss 5.64259]<br>
[epoch 1], [iter 196 / 46], [train loss 5.64477]<br>
[epoch 1], [iter 197 / 46], [train loss 5.64085]<br>
[epoch 1], [iter 198 / 46], [train loss 5.64281]<br>
[epoch 1], [iter 199 / 46], [train loss 5.64357]<br>
[epoch 1], [iter 200 / 46], [train loss 5.64432]<br>
[epoch 1], [iter 201 / 46], [train loss 5.64584]<br>
[epoch 1], [iter 202 / 46], [train loss 5.64703]<br>
[epoch 1], [iter 203 / 46], [train loss 5.64933]<br>
[epoch 1], [iter 204 / 46], [train loss 5.65146]<br>
[epoch 1], [iter 205 / 46], [train loss 5.65343]<br>
[epoch 1], [iter 206 / 46], [train loss 5.65101]<br>
[epoch 1], [iter 207 / 46], [train loss 5.64879]<br>
[epoch 1], [iter 208 / 46], [train loss 5.64652]<br>
[epoch 1], [iter 209 / 46], [train loss 5.64710]<br>
[epoch 1], [iter 210 / 46], [train loss 5.64494]<br>
[epoch 1], [iter 211 / 46], [train loss 5.64680]<br>
[epoch 1], [iter 212 / 46], [train loss 5.64859]<br>
[epoch 1], [iter 213 / 46], [train loss 5.64499]<br>
[epoch 1], [iter 214 / 46], [train loss 5.64129]<br>
[epoch 1], [iter 215 / 46], [train loss 5.64179]<br>
[epoch 1], [iter 216 / 46], [train loss 5.63810]<br>
[epoch 1], [iter 217 / 46], [train loss 5.63616]<br>
[epoch 1], [iter 218 / 46], [train loss 5.63248]<br>
[epoch 1], [iter 219 / 46], [train loss 5.63075]<br>
[epoch 1], [iter 220 / 46], [train loss 5.63314]<br>
[epoch 1], [iter 221 / 46], [train loss 5.63499]<br>
[epoch 1], [iter 222 / 46], [train loss 5.63282]<br>
[epoch 1], [iter 223 / 46], [train loss 5.63069]<br>
[epoch 1], [iter 224 / 46], [train loss 5.63275]<br>
[epoch 1], [iter 225 / 46], [train loss 5.63468]<br>
[epoch 1], [iter 226 / 46], [train loss 5.63695]<br>
[epoch 1], [iter 227 / 46], [train loss 5.63905]<br>
[epoch 1], [iter 228 / 46], [train loss 5.63705]<br>
[epoch 1], [iter 229 / 46], [train loss 5.63912]<br>
[epoch 1], [iter 230 / 46], [train loss 5.63712]<br>
[epoch 1], [iter 231 / 46], [train loss 5.63895]<br>
[epoch 1], [iter 232 / 46], [train loss 5.63683]<br>
[epoch 1], [iter 233 / 46], [train loss 5.63483]<br>
[epoch 1], [iter 234 / 46], [train loss 5.63609]<br>
[epoch 1], [iter 235 / 46], [train loss 5.63810]<br>
[epoch 1], [iter 236 / 46], [train loss 5.63984]<br>
[epoch 1], [iter 237 / 46], [train loss 5.63673]<br>
[epoch 1], [iter 238 / 46], [train loss 5.63464]<br>
[epoch 1], [iter 239 / 46], [train loss 5.63659]<br>
[epoch 1], [iter 240 / 46], [train loss 5.63457]<br>
[epoch 1], [iter 241 / 46], [train loss 5.63610]<br>
[epoch 1], [iter 242 / 46], [train loss 5.63365]<br>
[epoch 1], [iter 243 / 46], [train loss 5.63121]<br>
[epoch 1], [iter 244 / 46], [train loss 5.62911]<br>
[epoch 1], [iter 245 / 46], [train loss 5.62714]<br>
[epoch 1], [iter 246 / 46], [train loss 5.62517]<br>
[epoch 1], [iter 247 / 46], [train loss 5.62275]<br>
[epoch 1], [iter 248 / 46], [train loss 5.62078]<br>
[epoch 1], [iter 249 / 46], [train loss 5.62231]<br>
[epoch 1], [iter 250 / 46], [train loss 5.62393]<br>
[epoch 1], [iter 251 / 46], [train loss 5.62572]<br>
[epoch 1], [iter 252 / 46], [train loss 5.62235]<br>
[epoch 1], [iter 253 / 46], [train loss 5.62350]<br>
[epoch 1], [iter 254 / 46], [train loss 5.62514]<br>
[epoch 1], [iter 255 / 46], [train loss 5.62367]<br>
[epoch 1], [iter 256 / 46], [train loss 5.62034]<br>
[epoch 1], [iter 257 / 46], [train loss 5.61872]<br>
[epoch 1], [iter 258 / 46], [train loss 5.61727]</p>
<pre><code class="lang-auto"></code></pre>

username: ptrblck
cooked: <p>In your code snippet you are using <code>test</code> to get the data instead of the <code>dataloader</code>:</p>
<pre><code class="lang-python">for i, data in enumerate(test):
</code></pre>
<p>which seems to be globally defined and might contain more samples that the wanted <code>dataloader</code>.</p>