# Yolo from scratch dataset and output

Hi I coded a YOLO model from scratch and just came to realise that my dataset does not fit the models output. This is what I mean: The model outputs a S x S x (B * 5 + C) matrix. The shape of y[0] (the answer for the first image) is (7,5). How will I make the model use the labels of mine. From what I knew and read the labels come in this format x,y,w,h,objectiveness_score, class_scores for the yolo algorithm so how come that the model will output a 3D matrix while the labels are a 2d matrix.

How will I solve the issue of mine by using numpy and keras?

• Hi @crocker, what are S, B and C variables? – mark mark Jan 27 at 14:38
• My model makes 3 bounding box predictions (B), 2 class predictions, and it S = 7. So how would I put my labels into its corresponding grid cell? – crocker Jan 28 at 3:39
• @crocker Please, edit your post to include this info in it. Moreover, please, put your main specific question in the title. "Yolo from scratch dataset and output" is not a question and quite vague. – nbro Jan 28 at 12:39