liuruijin17 / LSTR

This is an official repository of End-to-end Lane Shape Prediction with Transformers.
BSD 3-Clause "New" or "Revised" License
647 stars 130 forks source link

Little bug in db/custom.py #84

Open juanllaguno opened 2 years ago

juanllaguno commented 2 years ago

I think I find a little bug in the code.

In the line 79: self._cache_file = os.path.join(cache_dir, "{}.pkl".format(self._data, self._split)) It is missing one "{}" because how it is now it only creates one cache file .pkl, and as far as I understand one file is for training and one for validation. Otherwise the validation dataset is the same that the train dataset. Also the varible self._split is set to None, so the solution I find was:

self._split = split
self._cache_file = os.path.join(cache_dir, "{}_{}.pkl".format(self._data, self._split))

So this way the validation dataset is different that the training dataset.

Thanks for the contribution and the good work!

flinzhao commented 10 months ago

I also noticed this mistake and am about to bring it up.🤣