-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluation during training #840
Comments
thank you for the answer! I got the reason but if I wouldnt care about the time of training how would it be possible to add this mechanism do you have any idea? The code seemed to me a little bit complicated for this |
In the train loop after calling Then these lines can be omitted since you already evaluated during training. Something that came to my mind while I was formulating this answer is that maybe the memory footprint gets too large when you construct the Line 182 in a9c66fe
|
Im done with training time evaluation thank you for your instructions. Another very important thing for the research part and I try to implement is just to add "training accuracy" information. So basically I just do the same steps for training data but I dont know why, I get an error as below. Doesnt train and test loader loads the data in a similar way? evaluate validation dataset - calculate validation loss + accuracy
evaluate train dataset - calculate train accuracy
|
Sure I will send a pull request after finishing train accuracy problem !! |
I don't know, you need to debug where 'calib' gets added (or not added) to the |
I was working on this for my own research problems, but faced the same issue regarding calib, I'm not quite sure what causes this so for now i'm just using the following workaround:
I also had to do this for image_shape as I was facing the same issue. This will probably cause some slight accuracy errors but there are only a few frames of KITTI for which we get a KeyError |
Actually I updated the code and now I obtain train loss, train acc and validation acc during training. But in somehow it effected my results so now when I make an inference I obtain worse results than before (not too bad, in some how the train acc info doesnt seem ok but the inference results are still usable with a little decrease of accuracy). As a result we obtain these 2 tensorboard logs one for train loss and acc one for validation acc The main problem is when you use dataloader for training set (where you give training=True as parameter) you dont obtain calib info in your dataset info, otherwise you obtain. def build_dataloader(dataset_cfg, class_names, batch_size, dist, root_path=None, workers=4,
I tracked the issue and even at first initialize in kitti_dataset.py class KittiDataset(DatasetTemplate): both train and test datasets comes with the equal informations, the calibration info is deleted in dataset.py prepare_dataset() function. I commented out the lines where training mode make the calib deleted and it worked. def prepare_data(self, data_dict):
|
And finally I realized the situation... in datasey.py, the following part causes to lose calib info training dataset as I said. But I understand the reason now: if its in training mode, we apply "data augmentation" in self.data_augmentor.forward() function. And in this function calib info is deleted, only the ground truth boxes are updated according to the augmentation technique. So since I removed data augmentation from training, my results went kind a bad. To not lose data augmentation and still be able to obtain train time accuracy, I will try to load train data in test mode with some additional control flags if self.training:
|
Its done and I will do a pull request but the commits got a little bit complicated since the last 3 commit includes the changes for this part but I dont know exactly how to select the parts to pull request and the parts not to. Maybe you can take a look at the pull request and we can talk about @MartinHahner |
|
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Hello, I was wondering if there is a way to evaluate the model "during training". Not at the end of the training with a second command like test.py but to obtain validation accuracy and loss to compare the ones with training loss and accuracy (I didnt see any training accuracy information in mi tensorboard graphs though) Do you have any idea? It would be very useful to make a real research and finetuning to have train loss + accuracy - validation loss + accuracy informations. For example here is my train log in tensorboard with only loss information
The text was updated successfully, but these errors were encountered: