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

Visual network architecture #1492

Closed
Mming11 opened this issue May 3, 2023 · 6 comments
Closed

Visual network architecture #1492

Mming11 opened this issue May 3, 2023 · 6 comments

Comments

@Mming11
Copy link

Mming11 commented May 3, 2023

if I want to visualize the neural network architecture used in the ppg_metadrive_transformer_conf.py file,what should i do?

@Haichao-Zhang
Copy link
Contributor

Haichao-Zhang commented May 3, 2023

Hi Thanks for the message.

The procedure to visualize the algorithm architecture of a conf file is as follows:

  • intall graphviz: sudo apt-get install graphviz
  • run the training for a few epochs
    python -m alf.bin.train --conf=path_to_conf --root_dir=path_to_results

The figure algorithm_sturcture.png will be saved to the root dir.

Let us know if you have further questions.

@Mming11
Copy link
Author

Mming11 commented May 3, 2023

sry... I didn't find anything like a png in root dir.

@Mming11
Copy link
Author

Mming11 commented May 3, 2023

oh, i find this "W0503 23:24:27.788165 140296919340224 policy_trainer.py:111] Need "graphviz" installed if you want to visualize modules".
But i have installed it.
2023-05-03 23-26-28 的屏幕截图

@breakds
Copy link
Contributor

breakds commented May 3, 2023

Hi @Mming11,

The graphviz module prompted by alf actually means the graphviz python module. Depending on how you build your python development environment for alf, you may need to do so with poetry add graphviz or pip install graphviz. The package you have installed via apt does not provide the python package, at least not directly in your development environment as it appears.

Also, what kind of visualization do you expect?

@breakds
Copy link
Contributor

breakds commented May 3, 2023

algorithm_sturcture

Here is the visualization that I generated for ppg_metadrive_transformer. Hope it helps.

@Mming11
Copy link
Author

Mming11 commented May 4, 2023

Oh, that's great. Thank you very much!!!

@breakds breakds closed this as completed May 8, 2023
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

3 participants