# Last layers of YOLO

I would like if someone could explain to me something. The architecture in YOLO from the Figure 3 in your YOLO paper https://pjreddie.com/media/files/papers/yolo.pdf is like this:

(448,448,3), (112,112,192), (56,56,256), (28,28,512), (14,14,1024),(7,7,1024),(7,7,1024), Dense(4096), (7,7,30)

I don't understand how to implement the last three parts, bolded ones If it is not the problem, I would appreciate if you help me understand that part. I use Keras and everything is OK for me to implement except those parts. I really don't know how to pass from (7,7,1024) to (7,7,1024) and also from Dense to (7,7,30).

You can use the Flatten and Reshape layers to go to Dense and back to HWC format. The last layers in keras would look like this:

7_7_1024_1 = ...  # The first (7,7,1024)