Skip to content
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

Test the trained network in simulation #3

Open
kargarisaac opened this issue Nov 5, 2019 · 2 comments
Open

Test the trained network in simulation #3

kargarisaac opened this issue Nov 5, 2019 · 2 comments

Comments

@kargarisaac
Copy link

I modified the network and trained a new network. Now I want to use the main.py file to test it. But it wants pkl file. Why does it need data file? When I set the record=True to create a pkl file it says that I have to drive but the GUI doesn't show anything. I don't know why should I gather data. I used your data file and trained the model.

Thanks

@Iftimie
Copy link
Owner

Iftimie commented Nov 5, 2019

Hi!

When testing as well as training, the neural network requires a GPS-like path. Such a path can be found in the .pkl file that has just been recorded. The pickle contains a list of states and among them is the coordinates of the car. To find the interval of states to be drawn, we need to find which recorded state is closest to the car, and start drawing the fat GPS line from that state up + Config.path_future_len

path_idx = self.path.get_point_idx_close_to_car(self.vehicle, path_idx)

def get_point_idx_close_to_car(self, vehicle, path_idx):

selected_for_projection = self.vertices_W[:,path_idx:path_idx+ Config.path_future_len]

A good thing to do might be to decouple the train and test GPS paths, but at that time I did not cared that much about over fitting.
If you used the same data file to train the new model, just make sure that when Simulator is instantiated, the relative path to the .pkl file can be found and loaded. You don't need to record new data.
If you fork the repo and commit your modifications, maybe I could guide you better.
Hope I answered your question.

@kargarisaac
Copy link
Author

Thank you. I will test it after the training is finished tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants