Giter Site home page Giter Site logo

rl_gnn's Introduction

Instructions to execute

  1. First, create the virtual environment and activate the environment.
virtualenv -p python3 myenv
source myenv/bin/activate
  1. Then, we install all the required packages.
pip install -r requirements.txt
  1. Register custom gym environment.
pip install -e gym-environments/
  1. Now we are ready to train a DQN agent. To do this, we must execute the following command. Notice that inside the train_DQN.py there are different hyperparameters that you can configure to set the training for different topologies, to define the size of the GNN model, etc. 现在我们准备培训一名DQN特工。为此,我们必须执行以下命令。注意,在train_DQN内。py可以配置不同的超参数来设置不同拓扑的训练,定义GNN模型的大小等
python train_DQN.py
  1. Now that the training process is executing, we can see the DQN agent performance evolution by parsing the log files. 现在培训过程正在执行,我们可以通过解析日志文件看到DQN代理的性能演变。
python parse.py -d ./Logs/expsample_DQN_agentLogs.txt
  1. Finally, we can evaluate our trained model on different topologies executing the command below. Notice that in the evaluate_DQN.py script you must modify the hyperparameters of the model to match the ones from the trained model. 最后,我们可以执行下面的命令,在不同的拓扑上评估经过训练的模型。注意,在evaluate_DQN中。script必须修改模型的超参数,以匹配训练模型中的超参数。
python evaluate_DQN.py -d ./Logs/expsample_DQN_agentLogs.txt

python 中的egg文件;类似于Java 中的jar 包,把一系列的python源码文件、元数据文件、其他资源文件 zip 压缩, 重新命名为.egg 文件,目的是作为一个整体进行发布。

rl_gnn's People

Contributors

horn1998 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.