Hi all,
Here are my results after performing 1d convolution. I have the following CNN architecture for a dataset sized [batch, 1, 402].
class Simple1DCNN(torch.nn.Module):
    def __init__(self):
        super(Simple1DCNN, self).__init__()
        self.layer1 = torch.nn.Conv1d(in_channels = 1, out_channels = 10, kernel_size = 3)
        self.act = torch.nn.ReLU()
        self.layer2 = torch.nn.Conv1d(in_channels = 10, out_channels = 20, kernel_size = 3)
        self.fc1 = torch.nn.Linear(20*398, 1000)
        self.fc2 = torch.nn.Linear(1000, 50)
        self.fc3 = torch.nn.Linear(50, 1)
        self.conv2_drop = torch.nn.Dropout(0.5)
    
    def forward(self, x):
        x = self.act(self.layer1(x))
        x = self.act(self.conv2_drop(self.layer2(x)))
        x = x.view(-1, x.shape[1] * x.shape[-1])
        x = torch.tanh(self.fc1(x))
        x = torch.tanh(self.fc2(x))
        x = self.fc3(x)      # collecting the output of linear layer
        return x


I have used MSE loss as a loss metric. Does the plots look okay? Since the ouputs are float value (not labels) are the bumps on the validation loss justifiable?
P.S. the accuracy is just for my sake. I have considered the output within 10% of the actual output value to be accurate. How do you think I can minimize the fluctuations of validation accuracy?

cb950d6b557b8eef73855e9b9ea14c4f5c09b17a_2_1380x9521380×952 36.2 KB


417849adf011565af4e3336df152a8df9b00b57b_2_1380x9421380×942 52.3 KB


5b36b6e4506a9b3ec2c00192a56eadb9ec15ed23_2_1340x10001340×1000 106 KB

For a test set,
The trained model outputs the following:

image1042×227 12.3 KB

How to improve the test accuracy?