Training loss stopped decreasing after 10 epoch

Arfeen: <p>I am doing regression problem for images using CNN.My training decreases for certain epoch but after 10 epochs, it stopped decreasing.It starts fluctuating around the loss at epoch 10.I tried decreasing lr too, but it is also not helpful.I increased the network complexity but it is not helping too.Anyone having any ideas?</p>
<p>My network is given below -</p>
<p>class Purity(nn.Module):<br>
def <strong>init</strong>(self, dropout=True):<br>
super(Purity, self).<strong>init</strong>()<br>
print(“Purity predictor model”)<br>
self.reg_features = nn.Sequential(OrderedDict([<br>
(“conv1”, nn.Conv2d(6, 96, kernel_size=11, stride=4)),<br>
(“relu1”, nn.ReLU(inplace=True)),<br>
(“pool1”, nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True)),<br>
(“norm1”, nn.LocalResponseNorm(5, 1.e-4, 0.75)),<br>
(“conv2”, nn.Conv2d(96, 256, kernel_size=5, padding=2, groups=2)),<br>
(“relu2”, nn.ReLU(inplace=True)),<br>
(“pool2”, nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True)),<br>
(“norm2”, nn.LocalResponseNorm(5, 1.e-4, 0.75)),<br>
(“conv3”, nn.Conv2d(256, 384, kernel_size=3, stride=2)),<br>
(“relu3”, nn.ReLU(inplace=True)),<br>
(“conv4”, nn.Conv2d(384, 384, kernel_size=3, padding=1, groups=2)),<br>
(“relu4”, nn.ReLU(inplace=True)),<br>
(“conv5”, nn.Conv2d(384, 256, kernel_size=3, padding=1, groups=2)),<br>
(“relu5”, nn.ReLU(inplace=True)),<br>
(“pool5”, nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True)),<br>
]))<br>
self.regressor = nn.Sequential(OrderedDict([<br>
(“fc8”, nn.Linear(3<em>3</em>256, 4096)),<br>
(“relu8”, nn.ReLU(inplace=True)),<br>
(“drop6”, nn.Dropout() if dropout else Id()),<br>
(“fc9”, nn.Linear(4096, 1024)),<br>
(“relu9”, nn.ReLU(inplace=True)),<br>
(“drop9”, nn.Dropout() if dropout else Id()),<br>
(“fc10”, nn.Linear(1024, 1)),<br>
(“sigmoid”, nn.Sigmoid())<br>
]))</p>

JuanFMontesinos: <p>Well what you say is not meaningful.<br>
The loss will always stop decreasing at some point. You should use other metrics to evaluate the quality of your regression.</p>

Arfeen: <p><a class="mention" href="/u/juanfmontesinos">@JuanFMontesinos</a>…My loss decresed from 1 to 0.3 and it should decreases further as per my problem statement.</p>

_joker: <p><a class="mention" href="/u/arfeen">@Arfeen</a> Did you use data augmentations while loading data using the data loader?</p>
<pre><code class="lang-auto">def load_data(root_path, dir, batch_size, phase):
    transform_dict = {
        'train': transforms.Compose(
        [transforms.RandomResizedCrop(224),
         transforms.RandomHorizontalFlip(),
         transforms.ToTensor(),
         transforms.Normalize(mean=[0.485, 0.456, 0.406],
                              std=[0.229, 0.224, 0.225]),
         ]),
        'test': transforms.Compose(
        [transforms.Resize(224),
         transforms.ToTensor(),
         transforms.Normalize(mean=[0.485, 0.456, 0.406],
                              std=[0.229, 0.224, 0.225]),
         ])}
    data = datasets.ImageFolder(root=root_path + dir, transform=transform_dict[phase])
    data_loader = torch.utils.data.DataLoader(data, batch_size=batch_size, shuffle=True, drop_last=False, num_workers=4)
    return data_loader
</code></pre>
<p>Also, I would recommend trying more epochs as 10 epochs seem to be less given the complicated network.</p>

Arfeen: <p><a class="mention" href="/u/_joker">@_joker</a> …yes i am using both strong and weak augmentation on top of created Dataset object itself.Then used dataLoader for mini batch as part of my implmentation.I am using 50 epochs, at 10th epoch loss came down to 0.3 and after that it stopped decreasing.It starts fluctuating between 0.3 and 0.4</p>