I got this error, Sir:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_67/846327309.py in <module>
     30 # Run for 200 epochs (range is exclusive in the upper bound)
     31 for epoch in range(1, 201):
---> 32     train()
     33     train_acc = test(trainset)
     34     test_acc = test(testset)

/tmp/ipykernel_67/846327309.py in train()
     10 
     11     for data in trainset:
---> 12       out = model(data.pixel_values.view(-1, 3).float(), data.edge_index, data.batch)
     13       loss = criterion(out, data.detection_score)
     14       loss.backward()

/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1100         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1101                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102             return forward_call(*input, **kwargs)
   1103         # Do not call functions when jit is used
   1104         full_backward_hooks, non_full_backward_hooks = [], []

/tmp/ipykernel_67/355969921.py in forward(self, x, edge_index, batch)
     25 
     26       # 2. Readout layer
---> 27       x = global_mean_pool(x, batch)  # [batch_size, hidden_channels]
     28 
     29       # 3. Apply a final classifier

/usr/local/lib/python3.8/dist-packages/torch_geometric/nn/glob/glob.py in global_mean_pool(x, batch, size)
     46     """
     47 
---> 48     size = int(batch.max().item() + 1) if size is None else size
     49     return scatter(x, batch, dim=0, dim_size=size, reduce='mean')
     50 

AttributeError: 'NoneType' object has no attribute 'max'