TypeError: ‘tuple’ object is not callable

import torch.nn.functional as F
class TinVgg(nn.Module):
“”"summary
该链接解释了vgg架构:CNN Explainer

Args:
    nn (_type_): _description_
"""
def __init__(self,input_shape:int,
             hidden_units:int,
             out_shape:int) -> None:
    super(TinVgg,self).__init__()
    self.conv_block_1 = nn.Sequential(
        # 第一层
        nn.Conv2d(in_channels=input_shape,
                  out_channels=hidden_units,
                  kernel_size=3,
                  stride=1,
                  padding=1),
        nn.ReLU(),
        nn.Conv2d(
            in_channels=hidden_units,
            out_channels=hidden_units,
            kernel_size=3,
            stride=1,
            padding=1
        ),
        nn.ReLU(),
        # 最大池化
        nn.MaxPool2d(kernel_size=2,stride=2), # 步长与内核相同    
    ),
    self.conv_block_2 = nn.Sequential(
        # 第二层
        nn.Conv2d(in_channels=hidden_units,
                  out_channels=hidden_units,
                  kernel_size=3,
                  stride=1,
                  padding=1),
        nn.ReLU(),
        nn.Conv2d(
            in_channels=hidden_units,
            out_channels=hidden_units,
            kernel_size=3,
            stride=1,
            padding=1
        ),
        nn.ReLU(),
        # 最大池化
        nn.MaxPool2d(kernel_size=2,stride=2))# 步长与内核相同    
        # 创建分类器
        
    self.classifier = nn.Sequential(
        nn.Flatten(),
        nn.Linear(in_features=hidden_units,out_features=out_shape)
    )
    # 前向
def forward(self, x):
    x = self.conv_block_1(x)
    print(x.shape)
    x = self.conv_block_2(x)
    print(x.shape)
    x_class = self.classifier(x)
    return x_class
    """
    或者         return self.classifier(self.conv_block_2(self.conv_block_1(x))) 等价于上面的前向
    """

The error I get is: ----------------------------------------------- ----------------------------------
TypeError Traceback (most recent call last)
Cell In[110], line 1
----> 1 model_0(image_batch)

File d:\python_3.11\Lib\site-packages\torch\nn\modules\module.py:1501, in Module._call_impl(self, *args, **kwargs)
1496 # If we don’t have any hooks, we want to skip the rest of the logic in
1497 # this function, and just call forward.
1498 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks
1499 or _global_backward_pre_hooks or _global_backward_hooks
1500 or _global_forward_hooks or _global_forward_pre_hooks):
→ 1501 return forward_call(*args, **kwargs)
1502 # Do not call functions when jit is used
1503 full_backward_hooks, non_full_backward_hooks = ,

Cell In[104], line 57
56 def forward(self, x):
—> 57 x = self.conv_block_1(x)
58 print(x.shape)
59 x = self.conv_block_2(x)

TypeError: ‘tuple’ object is not callable

From a quick first look, it seems there is an additional comma after nn.Sequential(). Could you please remove the comma (,) after nn.Sequential() definition and try again?
In python, adding a comma makes it a tuple.
For example,

>>> x = 5,
>>> x
(5,)

>>> type(x)
<class 'tuple'>