CAFFE appears to be a deep learning framework, but I’m not sure if it will be helpful for me.
In terms of the input shape:
I made it so the data input tensor is [5, 1, 1, 50], as I assumed that [batch_size, channels, height, width] was meant to be the input. However, this is giving me errors.
Updated network code:
class ConvNet(nn.Module):
    def __init__(self):
        super(ConvNet, self).__init__()
        
        self.conv1 = nn.Conv2d(in_channels=5, out_channels=64, kernel_size=(1, 3), padding=0)
        self.conv2 = nn.Conv2d(64, 128, (1, 3), padding=0)
        self.conv3 = nn.Conv2d(128, 128, (1, 3), padding=0)
        
        self.fc1 = nn.Linear(5120, 2048)
        self.fc2 = nn.Linear(2048, 1024)
        self.fc3 = nn.Linear(1024, 3)
        
        self.pool = nn.MaxPool2d((2))
        
        self.dropout = nn.Dropout(p=0.2)
        
    def forward(self, x):
        x = F.relu(self.conv1(x))
        print(x.shape)
        x = self.pool(x)
        print(x.shape)
        x = F.relu(self.conv2(x))
        print(x.shape)
        print(x.shape)
        x = F.relu(self.conv3(x))
        print(x.shape)
        
        
        x = x.reshape(1, x.size()[0]  * x.size()[1])
        x = x.squeeze()
        
        print(x.shape)
        x = self.dropout(F.relu(self.fc1(x)))
        x = self.dropout(F.relu(self.fc2(x)))
        x = self.fc3(x)
        return x
    
model = ConvNet()
print(model)

Updated Training loop code:
epochs = 20

model.train()
model.double()

for epoch in range(epochs):
    training_loss = 0.0
    
    for data, target in trainloader:
        
        data = data.view(5, 1, 1, 50)
        target = target.view(5)
 

        print(data.shape)
        optimizer.zero_grad()
        output=model(data)
        
        loss = criterion(output, target)
        loss.backward()
        optimizer.step()
        training_loss+= loss.tem()*data.size(0)
    
    training_loss = training_loss/len(trainloader.sampler)
    
    print('Epoch: {} \tTraining Loss: {:.6f}'.format(
        epoch+1, 
        training_loss
        ))

Output:
torch.Size([5, 1, 1, 50])
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-159-69a1dbe7db1c> in <module>
     15         print(data.shape)
     16         optimizer.zero_grad()
---> 17         output=model(data)
     18 
     19         loss = criterion(output, target)

D:\Users\user\Anaconda3\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    538             result = self._slow_forward(*input, **kwargs)
    539         else:
--> 540             result = self.forward(*input, **kwargs)
    541         for hook in self._forward_hooks.values():
    542             hook_result = hook(self, input, result)

<ipython-input-158-31a2dc474011> in forward(self, x)
     16 
     17     def forward(self, x):
---> 18         x = F.relu(self.conv1(x))
     19         print(x.shape)
     20         x = self.pool(x)

D:\Users\user\Anaconda3\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    538             result = self._slow_forward(*input, **kwargs)
    539         else:
--> 540             result = self.forward(*input, **kwargs)
    541         for hook in self._forward_hooks.values():
    542             hook_result = hook(self, input, result)

D:\Users\user\Anaconda3\lib\site-packages\torch\nn\modules\conv.py in forward(self, input)
    346 
    347     def forward(self, input):
--> 348         return self._conv_forward(input, self.weight)
    349 
    350 class Conv3d(_ConvNd):

D:\Users\user\Anaconda3\lib\site-packages\torch\nn\modules\conv.py in _conv_forward(self, input, weight)
    343                             _pair(0), self.dilation, self.groups)
    344         return F.conv2d(input, weight, self.bias, self.stride,
--> 345                         self.padding, self.dilation, self.groups)
    346 
    347     def forward(self, input):

RuntimeError: Given groups=1, weight of size [64, 5, 1, 3], expected input[5, 1, 1, 50] to have 5 channels, but got 1 channels instead

I know that this architecture probably doesn’t make the most sense, but I feel like I’m a bit closer to figuring this problem out. Thank you once again!