Yolo Custom Training Help: RuntimeError: Sizes of tensors must match except in dimension 1

Hello all,
I was trying out YoloV8 custom training for segmentation from Roboflow tutorial.
I started with loading my labeled dataset from Roboflow.

!mkdir {HOME}/datasets
%cd {HOME}/datasets

!pip install roboflow

from roboflow import Roboflow
rf = Roboflow(api_key="xxxxxxxxxxxx")
project = rf.workspace("suns-d").project("building-component-detection")
dataset = project.version(1).download("yolov8")

Then, I used the following script to start the training.

%cd {HOME}

!yolo task=segment mode=train model=yolov8s-seg.pt data={dataset.location}/data.yaml epochs=10 imgsz=640

But “RuntimeError: Sizes of tensors must match except in dimension 1” shows up and not sure how to deal with it. Help is much appreciated.

Below is my current Colab script that I am working on (reference:GitHub - roboflow/notebooks: Set of Jupyter Notebooks linked to Roboflow blog posts and used in our YouTube videos.).

All of my labeled images are 640x640