torchinfo works properly for me using the initially posted model:
import torch
import torch.nn as nn
from torchinfo import summary


class CustomNeuralNet(nn.Module):
    def __init__(self,num_classes):
        super(CustomNeuralNet,self).__init__()

        self.conv_1 = nn.Conv2d(in_channels=3,out_channels=32,kernel_size=3,padding=1,stride=1)
        self.activation_1 = nn.LeakyReLU()

        self.conv_2 = nn.Conv2d(in_channels=32,out_channels=64,kernel_size=3,padding=1,stride=1)
        self.activation_2 = nn.LeakyReLU()
        
        self.conv_3 = nn.Conv2d(in_channels=64,out_channels=64,kernel_size=3,padding=1,stride=1)
        self.activation_3 = nn.LeakyReLU()

        self.fc = nn.Linear(in_features=300*300*64,out_features=num_classes)

    
    def forward(self,inp):
        out = self.conv_1(inp)
        out = self.activation_1(out)

        out = self.conv_2(out)
        out = self.activation_2(out)

        out = self.conv_3(out)
        out = self.activation_3(out)

        out = out.view(out.size(0), -1)

        out = self.fc(out)
        return out

model = CustomNeuralNet(10)
summary(model, input_size=(1, 3, 300, 300))

==========================================================================================
Layer (type:depth-idx)                   Output Shape              Param #
==========================================================================================
CustomNeuralNet                          --                        --
├─Conv2d: 1-1                            [1, 32, 300, 300]         896
├─LeakyReLU: 1-2                         [1, 32, 300, 300]         --
├─Conv2d: 1-3                            [1, 64, 300, 300]         18,496
├─LeakyReLU: 1-4                         [1, 64, 300, 300]         --
├─Conv2d: 1-5                            [1, 64, 300, 300]         36,928
├─LeakyReLU: 1-6                         [1, 64, 300, 300]         --
├─Linear: 1-7                            [1, 10]                   57,600,010
==========================================================================================
Total params: 57,656,330
Trainable params: 57,656,330
Non-trainable params: 0
Total mult-adds (G): 5.13
==========================================================================================
Input size (MB): 1.08
Forward/backward pass size (MB): 115.20
Params size (MB): 230.63
Estimated Total Size (MB): 346.91
==========================================================================================