in train - why do you define the loss as the result of the model? (loss_dict = model(images, targets))
you should do the same thing both in train and in eval
outputs = model(inputs)
and then calculate the losses