Inside YOLOlayer you should define the gridsize if you’d want to call it in:

for yololayer in yolo_layers_list:
# get number of grid points and anchor vec for this yolo layer
ng, anchor_vec = yololayer.gridsize, yololayer.anchor_vec