A couple of questions

The NLL loss is used for a classification task. Your target is of shape [8 x 360 x 640], Are you trying to do segmentation? Can you clarify your task?
The height and width of your image are not of the same size. Do print out your extension to the VGG model, input shapes and target shapes which would clarify this.