Hi, I’m having an issue where the loss isn’t behaving as expected. I’ve looked at similar questions in discussion forums and tried adjusting some things based on those suggestions, but it still hasn’t resolved the problem.
I went through my notebook several times but I am unable to find out the issue. Please someone help me to resolve this.
see if this helps you
I’ve already made those changes based on your suggestions. However, it’s still not working for me. I’ve been stuck on this for a while. Can I send you my code? Could you please review it and help me find the mistake? I really appreciate your help.
can you send screenshot of download checkpoints exercise 4 by personal dm
the linked provided for download checkpoint requires correction only space wise.
I suppose you copy pasted but I think you tried copy pasting the link in section causing extra space between ssd, in your code link it is seen as s sd
next for code copy checkpoint to test data, kind use the below link
copy the checkpoint to the test_data folder models/research/object_detection/test_data/
!cp -r ssd_resnet50_v1_fpn_640x640_coco17_tpu-8/checkpoint models/research/object_detection/test_data/
Regards
DP
issues with your codes
- from Exercise 2: Visualize the training images
for code line
define the path (string) for each image, you have used incorrect directory (you used global variable) where as you were suppose to use the assign the name (string) of the directory containing the training images, i.e. train_image_dir
- Now from Exercise 10: Define the training step
In the preprocess the image step
You were suppose to create an empty list of preproccessed_image_list and true_shape list
Then preprocess the img in the image_list loop where you create processed_img, true_shape using model.preprocess function to img, then under this loop first you append the processed_img to the preprocessed_image_list using .append, and lastly append the true_shape to the true_shape list
Now you create the tensor form of preproccessed_image_list and true_shape list in separate steps using tf.concat. please make sure to mention correct axis
Your make a prediction code is correct
Now while calculating total loss, you need to do corrections as you missed this step
Calculate the loss (and make sure the loss function has the ground truth to compare with the prediction)
So use the model.provide_groundtruth to create a list of groundtruth_boxes_list, groundtruth_classes_list.
Now comes your losses_dict and total loss codes, also in total loss please mention Loss and not loss
You also have not written codes for
Optimize the model’s selected variables-For this you can refer the section before exercise 10
Remember everything I mentioned was explained before the exercise 10, in calculate loss and provide groundtruth section.