repo
stringlengths
2
99
file
stringlengths
13
225
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
4.26M
extension_type
stringclasses
1 value
dbcsr
dbcsr-master/src/acc/libsmm_acc/notebooks/nb_helper.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
4,300
37.401786
100
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/predict/predict_collect.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
10,977
39.810409
116
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/predict/predict_evaluate.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
6,385
35.491429
118
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/predict/prepare_training_data.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
31,743
37.108043
128
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/predict/predict_genpars.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
15,537
37.176904
128
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/predict/predict_helpers.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
9,209
29.496689
100
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/predict/predict_train.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
60,672
34.986358
123
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc_dnt_base.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
7,148
34.216749
180
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc_dnt_medium.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
8,066
37.051887
115
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc_dnt_small.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
7,540
35.785366
115
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc_dnt_largeDB2.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
9,535
37.607287
115
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc_predict.py
#################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. # # ...
30,722
38.693798
128
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc.py
#################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. # # ...
5,917
33.208092
111
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc_dnt_largeDB1.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
9,554
37.841463
115
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/smm_acc_dnt_tiny.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
6,060
34.863905
115
py
dbcsr
dbcsr-master/src/acc/libsmm_acc/kernels/__init__.py
# -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
941
84.636364
108
py
dbcsr
dbcsr-master/tests/generate_libsmm_acc_timer_multiply.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
5,272
35.874126
128
py
dbcsr
dbcsr-master/tests/generate_libsmm_acc_unittest_multiply.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
4,958
36.568182
128
py
dbcsr
dbcsr-master/.pre-commit/check_header.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################### # Copyright (C) by the DBCSR developers group - All rights reserved # # This file is part of the DBCSR library. ...
3,541
34.42
100
py
neural_graph_evolution
neural_graph_evolution-master/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/html_visual/vis_spc_tree.py
''' visualizing the tree structure specific to one species ''' import init_path import os import numpy as np import argparse import json import glob from pprint import pprint # local imports from util import visdom_util def get_config(): ''' parse the arguments for visualizing the evolution process '''...
4,203
27.214765
88
py
neural_graph_evolution
neural_graph_evolution-master/html_visual/init_path.py
# ------------------------------------------------------------------------------ # @brief: # In this file we init the path # @author: # Written by Tingwu Wang, 2016/Sep/22 # ------------------------------------------------------------------------------ import os.path as osp import sys import datetime ...
1,039
18.622642
80
py
neural_graph_evolution
neural_graph_evolution-master/html_visual/html_visual.py
''' create visualization all the training sessions in ../evolution_data/ ''' import os import init_path import glob import json import argparse import subprocess from shutil import copyfile # local imports from html_visual import vis_tree from html_visual import vis_spc_tree GENEALOGY_HTML = \ os.path.join(init...
3,354
29.779817
82
py
neural_graph_evolution
neural_graph_evolution-master/html_visual/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/html_visual/vis_tree.py
''' this file implements the functionality to visualize gene tree (possibly with physical structure visualization) preliminary settings: 1. set up local host server because of the d3 library being used. need to have the directory to be correct (preferably use the root directory of the project). python -m htt...
15,384
28.643545
86
py
neural_graph_evolution
neural_graph_evolution-master/config/evolutionary_config.py
# ------------------------------------------------------------------------------ # @brief: # All the parameters of evolutionary agents are listed here # @author: # Tingwu Wang, 2017, June, 12th # ------------------------------------------------------------------------------ import numpy as np def get_...
6,283
45.895522
89
py
neural_graph_evolution
neural_graph_evolution-master/config/init_path.py
../tool/init_path.py
20
20
20
py
neural_graph_evolution
neural_graph_evolution-master/config/config.py
# ------------------------------------------------------------------------------ # @brief: # record the parameters here # @author: # Tingwu Wang, 2017, June, 12th # ------------------------------------------------------------------------------ import argparse from .evolutionary_config import get_evolut...
11,499
46.916667
85
py
neural_graph_evolution
neural_graph_evolution-master/config/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/evolution/species_bank.py
# ----------------------------------------------------------------------------- # @brief: # The species_bank save all the information of the species # written by Tingwu Wang # ----------------------------------------------------------------------------- import numpy as np import init_path from util import...
10,560
38.114815
94
py
neural_graph_evolution
neural_graph_evolution-master/evolution/agent_bank.py
# ----------------------------------------------------------------------------- # @brief: # The species_bank save all the information of the species # written by Tingwu Wang # ----------------------------------------------------------------------------- import multiprocessing from agent import evolution_a...
1,786
28.295082
79
py
neural_graph_evolution
neural_graph_evolution-master/evolution/init_path.py
../tool/init_path.py
20
20
20
py
neural_graph_evolution
neural_graph_evolution-master/evolution/species2species.py
# ----------------------------------------------------------------------------- # @brief: # util function for assigning running_mean and embedding for the agent # Note these functions should be called by the evolutionary agent! # written by Tingwu Wang # ---------------------------------------------...
13,156
36.48433
84
py
neural_graph_evolution
neural_graph_evolution-master/evolution/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/evolution/evo_analysis.py
''' @brief: analyze the population after each generation ''' import init_path from util import logger from sklearn.decomposition import PCA import numpy as np # local imports from util import visdom_util __BASE_PATH = init_path.get_abs_base_dir() def print_info(args): ''' print important training h...
9,737
38.585366
88
py
neural_graph_evolution
neural_graph_evolution-master/util/tree_util.py
import pdb class Node(): def __init__(self, attr, name=''): self.name = name self.attr = attr self.parent = None self.children = [] def add_child(self, new_Node): self.children.append(new_Node) def get_parent(self): return self.parent class BiTree(): ...
431
12.5
38
py
neural_graph_evolution
neural_graph_evolution-master/util/nn_cells.py
""" Basic cells of neural network Renjie Liao """ import tensorflow as tf from six.moves import xrange def weight_variable(shape, init_method=None, dtype=tf.float32, init_para=None, wd=None, seed=1234, ...
19,159
31.255892
80
py
neural_graph_evolution
neural_graph_evolution-master/util/summary_handler.py
# ----------------------------------------------------------------------------- # @brief: # define the how to record the summary # @author: # Tingwu Wang # ----------------------------------------------------------------------------- import init_path from util import logger import tensorflow as tf impo...
3,068
33.875
79
py
neural_graph_evolution
neural_graph_evolution-master/util/ob_normalizer.py
# ----------------------------------------------------------------------------- # @brief: # do a running mean and normalization on the observation # This is actually very important for the performances # @Updated: # Jun., 22rd, 2017, by Tingwu Wang # Aug., 8th, 2017, add the running mean by ...
2,322
29.168831
79
py
neural_graph_evolution
neural_graph_evolution-master/util/init_path.py
../tool/init_path.py
20
20
20
py
neural_graph_evolution
neural_graph_evolution-master/util/visdom_util.py
''' visdom related functions to print the curves ''' import pdb from visdom import Visdom import numpy as np import time # viz = Visdom(server='http://18.218.194.87', port=4212) # aws server port viz = None def visdom_initialize(args): ''' ''' global viz if args.vis_port < 4212 or args.vis_port > 4...
3,756
27.9
85
py
neural_graph_evolution
neural_graph_evolution-master/util/parallel_util.py
# ----------------------------------------------------------------------------- # @brief: Define some signals used during parallel # ----------------------------------------------------------------------------- # it makes the main trpo agent push its weights into the tunnel START_SIGNAL = 1 # it ends the training E...
825
28.5
79
py
neural_graph_evolution
neural_graph_evolution-master/util/utils.py
# ----------------------------------------------------------------------------- # @brief: # some helper functions about stats and layers # ----------------------------------------------------------------------------- import tensorflow as tf import numpy as np import scipy.signal from six.moves import xrange ...
6,273
26.884444
80
py
neural_graph_evolution
neural_graph_evolution-master/util/logger.py
# ----------------------------------------------------------------------------- # @brief: # The logger here will be called all across the project. It is inspired # by Yuxin Wu (ppwwyyxx@gmail.com) # # @author: # Tingwu Wang, 2017, Feb, 20th # -----------------------------------------------------------...
2,698
28.336957
79
py
neural_graph_evolution
neural_graph_evolution-master/util/fpdb.py
# ----------------------------------------------------------------------------- # @brief: # some helper functions about pdb. # ----------------------------------------------------------------------------- import sys import pdb class fpdb(pdb.Pdb): ''' @brief: a Pdb subclass that may b...
621
24.916667
80
py
neural_graph_evolution
neural_graph_evolution-master/util/dm_control_util.py
# ----------------------------------------------------------------------------- # @brief: # wrapper for the dm_control ob dictionary # @author: # Tingwu Wang # ----------------------------------------------------------------------------- # import pdb # import sys import init_path import numpy as np # im...
4,418
34.071429
83
py
neural_graph_evolution
neural_graph_evolution-master/util/model_gen_util.py
''' @brief utility functions can be used for model gen (mostly just some analytical geometry) @author: Henry Zhou, April 1st, 2018 ''' import pdb import numpy as np import math import random def gaussian_noise(mu, std, discrete, step_size=None,): ''' ''' if discrete and (st...
5,393
27.539683
85
py
neural_graph_evolution
neural_graph_evolution-master/util/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/util/agent_util.py
from network.baseline_network import tf_baseline_network def build_baseline_network(args, session, name_scope, observation_size, gnn_placeholder_list, obs_placeholder): assert not args.use_gnn_as_value baseline_network = tf_baseline_network( sessi...
711
31.363636
75
py
neural_graph_evolution
neural_graph_evolution-master/util/model_saver.py
# ----------------------------------------------------------------------------- # @brief: it is out-dated # in this model, we save the weights by our own function # written by Tingwu Wang # ----------------------------------------------------------------------------- import init_path import numpy as np fr...
9,731
37.466403
80
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/mujoco_parser.py
#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # @brief: # Some helper functions to parse the mujoco xml template files # @author: # Tingwu Wang, Jun 23rd, 2017 # @UPDATE: # 1. add the tendon support # 2. add support for HumanoidStand...
32,826
37.62
80
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/gen_gnn_param.py
''' @brief: @author: Henry Zhou, March 31st, 2018 @update: ''' import init_path import numpy as np from util import model_gen_util from env import model_gen ROOT_PATH = init_path.get_abs_base_dir() ''' definition of nodes: @root: the 'root' node ''' _NODE_TYPE = ['root', 'joint', ...
16,323
37.774347
91
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/init_path.py
../tool/init_path.py
20
20
20
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/gnn_util.py
#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # @brief: # Some helper functions to parse the mujoco xml template files # @author: # Tingwu Wang, Jun 23rd, 2017 # @UPDATE: # ------------------------------------------------------------------------...
6,609
32.21608
81
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/nervenetplus_util.py
#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # @brief: # Build the nervenet placeholders. Basically, we now have a different # setting as [nstep, minibatch_size / nstep] # @author: # Tingwu Wang, August. 13th, 2018 # -----------------------...
1,270
33.351351
79
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/structure_mapper.py
#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # @author: # Tingwu Wang, Jun 23rd, 2017 # ----------------------------------------------------------------------------- import init_path from util import logger from . import mujoco_parser import numpy as n...
7,819
39.942408
79
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/graph_data_util.py
#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # @brief: # In this function, we change the data from [batch_size, ob_dim] into # [batch_size * num_node, hidden_dim] # @author: # Tingwu Wang, Jul. 13th, 2017 # ---------------------------------...
9,776
35.89434
79
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/gnn_io_util.py
#!/usr/bin/env python2 # ----------------------------------------------------------------------------- # @brief: # Some helper functions to prepare the input # @author: # Tingwu Wang, April 10th, 2018 # ----------------------------------------------------------------------------- import init_path impo...
7,542
37.28934
79
py
neural_graph_evolution
neural_graph_evolution-master/graph_util/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/network/pruning_network.py
# ----------------------------------------------------------------------------- # @brief: # For the baseline network, we only need three functions to be defined # @fit, @save_checkpoint, and @load_checkpoint # @author: # Tingwu Wang, modified from kvfran and ppo repository. # ---------------------...
13,966
38.678977
83
py
neural_graph_evolution
neural_graph_evolution-master/network/init_path.py
../tool/init_path.py
20
20
20
py
neural_graph_evolution
neural_graph_evolution-master/network/nervenetplus_policy.py
# ------------------------------------------------------------------------------ # @brief: # The nervenet plus! Where we use truncated bp to optimize the weights # @Input: # _input_obs: [num_prop_steps * batch_size, ob_size] # _input_hidden_state: [batch_size, hidden_dim], # ...
25,674
39.179969
80
py
neural_graph_evolution
neural_graph_evolution-master/network/nervenet_policy.py
# ------------------------------------------------------------------------------ # @author: # Tingwu Wang, modified from the code of Renjie Liao. # @UPDATE: # The code for the evolutionary environment # ------------------------------------------------------------------------------ import init_path impor...
24,517
39.325658
80
py
neural_graph_evolution
neural_graph_evolution-master/network/baseline_network.py
# ----------------------------------------------------------------------------- # @brief: # For the baseline network, we only need three functions to be defined # @fit, @save_checkpoint, and @load_checkpoint # @author: # Tingwu Wang, modified from kvfran and ppo repository. # ---------------------...
2,937
28.979592
79
py
neural_graph_evolution
neural_graph_evolution-master/network/policy_network.py
# ----------------------------------------------------------------------------- # @author: # Tingwu Wang # TODO: 1. modify the mlp layer setting (list) # ----------------------------------------------------------------------------- import init_path import tensorflow as tf import numpy as np from util.utils im...
6,959
35.825397
79
py
neural_graph_evolution
neural_graph_evolution-master/network/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/network/gated_graph_policy_network.py
# ------------------------------------------------------------------------------ # @author: # Tingwu Wang, modified from the code of Renjie Liao. # @UPDATE: # 27th, Aug: MAJOR UPDATE: change the node input totally. # NOTE: Now the input is in node order # ------------------------------------------...
27,387
39.755952
80
py
neural_graph_evolution
neural_graph_evolution-master/network/treenet_policy.py
# ------------------------------------------------------------------------------ # @brief: # The nervenet plus! Where we use truncated bp to optimize the weights # @Input: # _input_obs: [num_prop_steps * batch_size, ob_size] # _input_hidden_state: [batch_size, hidden_dim], # ...
25,785
39.040373
80
py
neural_graph_evolution
neural_graph_evolution-master/visual/gen_vid.py
''' utility file for generating videos in <evolution_data> directory ''' import sh import os import subprocess if __name__ == '__main__': for directory in os.listdir('../evolution_data'): print(directory) cmd = 'python ../env/visualize_species.py -i ../evolution_data/%s/species_video -v 1' % (...
354
24.357143
107
py
neural_graph_evolution
neural_graph_evolution-master/visual/visual_info.py
''' some special requirements for some experiment configuration ''' import init_path USE_TIME_AS_X = 2 BF_EVOLUTION = 1 SINGLE_TOPO_FILE = 3 special_requirement = { 'bump': { '1': 0, '2': 0, 'FishSpeed': 0 }, 'fishspeed': { 'BruteForce_100': 1, 'BruteForce_20':...
13,313
30.549763
79
py
neural_graph_evolution
neural_graph_evolution-master/visual/visualize_species_struct.py
''' this script takes in a remote directory henryzhou@<server>:<path to /evolution/trn_sess> to local ../evolution_data select the top performing structures and bursts its images ''' import init_path import argparse # system import import os import time import glob import subprocess # computation import ...
4,116
30.427481
84
py
neural_graph_evolution
neural_graph_evolution-master/visual/sew_vid.py
''' utility file for sewing generated images ''' import os import sh import subprocess if __name__ == '__main__': for directory in os.listdir('../evolution_data'): print(directory) cmd = 'python evo_video.py --trn_sess ../evolution_data/%s --vid_name %s' \ % (directory, directo...
347
22.2
83
py
neural_graph_evolution
neural_graph_evolution-master/visual/init_path.py
# ------------------------------------------------------------------------------ # @brief: # In this file we init the path # @author: # Written by Tingwu Wang, 2016/Sep/22 # ------------------------------------------------------------------------------ import os.path as osp import sys import datetime ...
1,039
18.622642
80
py
neural_graph_evolution
neural_graph_evolution-master/visual/visual_util.py
''' utility function for visualizing stats about a training session ''' import init_path # system imports import os import csv import glob import datetime # compute imports import numpy as np # plotting and data processing imports import matplotlib import matplotlib.pyplot as plt from matplotlib import rc rc('fo...
26,225
30.559567
88
py
neural_graph_evolution
neural_graph_evolution-master/visual/evo_video.py
''' this script generates the k-th best performing species in the generation ''' import init_path # system import os import glob import argparse import cv2 from tqdm import tqdm # compute import numpy as np ''' there are 2 training sessions serve as a good candidate ../evolution_data/evofish3d-speed_2018...
3,176
26.868421
77
py
neural_graph_evolution
neural_graph_evolution-master/visual/vis_data.py
''' plot learning curves for evolution data ''' # setups DATA_DIR = '/Users/Jarvis/Desktop/evolutionary_data' # DATA_DIR = '/Users/Jarvis/Desktop/evo_data/evolutionary_data' DATA_TEST_CSV_FILE1 = \ '/Users/Jarvis/Desktop/evolutionary_data/fishspeed/FC_100.csv' DATA_TEST_CSV_FILE2 = \ '/Users/Jarvis/Desktop/evo...
11,664
36.629032
99
py
neural_graph_evolution
neural_graph_evolution-master/tool/main.py
# ----------------------------------------------------------------------------- # @brief: main fucntion # ----------------------------------------------------------------------------- import os import gym # import pdb import init_path from agent import optimization_agent from agent import rollout_master_agent from c...
5,774
32.970588
82
py
neural_graph_evolution
neural_graph_evolution-master/tool/init_path.py
# ------------------------------------------------------------------------------ # @brief: # In this file we init the path # @author: # Written by Tingwu Wang, 2016/Sep/22 # ------------------------------------------------------------------------------ import os.path as osp import sys import datetime ...
1,039
18.622642
80
py
neural_graph_evolution
neural_graph_evolution-master/tool/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/tool/evolution_main.py
# ----------------------------------------------------------------------------- # @brief: main function # ----------------------------------------------------------------------------- import os import init_path from config.config import get_config from util import parallel_util from util import logger from util impo...
4,055
35.872727
80
py
neural_graph_evolution
neural_graph_evolution-master/env/test_model_gen.py
''' script to test the functionality of model_gen ''' # my imports import init_path from config.config import get_config # import os import pdb from env import fish_env_wrapper from env import walker_env_wrapper # import lxml import lxml.etree as etree import numpy as np # local imports from env import model_gen...
5,410
32.401235
102
py
neural_graph_evolution
neural_graph_evolution-master/env/model_perturb.py
''' function to perturb a mujoco model given the 'genes' (adj_matrix and node_attributes) the function was originally implemented in model_gen.py create a new directory for better structure ''' from __future__ import division import init_path import pdb import numpy as np import random import copy # local...
12,956
38.027108
90
py
neural_graph_evolution
neural_graph_evolution-master/env/test_fish.py
# ----------------------------------------------------------------------------- # @author: # Tingwu Wang # @brief: # The environment wrapper # ----------------------------------------------------------------------------- import init_path from config.config import get_config import os # os.environ['DISAB...
1,964
28.328358
79
py
neural_graph_evolution
neural_graph_evolution-master/env/init_path.py
# ------------------------------------------------------------------------------ # @brief: # In this file we init the path # @author: # Written by Tingwu Wang, 2016/Sep/22 # ------------------------------------------------------------------------------ import os.path as osp import sys import datetime ...
1,056
18.943396
80
py
neural_graph_evolution
neural_graph_evolution-master/env/hierarchy_model.py
''' @brief: introduct hiearchical structure in the model @author: henry zhou ''' import init_path import numpy as np import random from copy import deepcopy import lxml.etree as etree # local import from env import model_gen from env import model_perturb from util import model_gen_util from util import logger...
23,057
32.465893
97
py
neural_graph_evolution
neural_graph_evolution-master/env/walker_env_wrapper.py
''' ''' import init_path from util import dm_control_util from util import model_gen_util import os import numpy as np from env.dm_env_wrapper import dm_env_wrapper import collections # from env.dm_env_wrapper import NUM_EPISODE_RECORED class dm_walker_wrapper(dm_env_wrapper): ''' ''' def __init__(self,...
8,433
33.145749
87
py
neural_graph_evolution
neural_graph_evolution-master/env/fish_env_wrapper.py
# ----------------------------------------------------------------------------- # @author: # Tingwu Wang # @brief: # The environment wrapper for the fishes! # ----------------------------------------------------------------------------- import init_path from util import dm_control_util from util import ...
13,377
36.473389
80
py
neural_graph_evolution
neural_graph_evolution-master/env/visualize_agent.py
# ----------------------------------------------------------------------------- # @author: # Tingwu Wang # @brief: # generate the videos into the same directory # ----------------------------------------------------------------------------- import env_wrapper import numpy as np import argparse import gl...
2,657
29.204545
80
py
neural_graph_evolution
neural_graph_evolution-master/env/model_gen.py
''' function to generate a mujoco model xml file ''' from __future__ import division import init_path import pdb import lxml.etree as etree import numpy as np import random import copy import os # local import from util import model_gen_util from env import species_info # from env import hierarchy_model # library...
68,512
40.801708
175
py
neural_graph_evolution
neural_graph_evolution-master/env/visualize_species.py
# ----------------------------------------------------------------------------- # @author: # Tingwu Wang # @brief: # generate the videos into the same directory # ----------------------------------------------------------------------------- import numpy as np import argparse import glob import cv2 impor...
8,276
36.283784
115
py
neural_graph_evolution
neural_graph_evolution-master/env/test_hierarchy_model.py
''' script to test the functionality of hierarchical model ''' import init_path from config.config import get_config import os from env import fish_env_wrapper from env import model_gen from util import model_gen_util from env import hierarchy_model from env import test_model_gen as test_func import cv2 max_fr...
2,169
23.942529
71
py
neural_graph_evolution
neural_graph_evolution-master/env/__init__.py
0
0
0
py
neural_graph_evolution
neural_graph_evolution-master/env/env_wrapper.py
# ----------------------------------------------------------------------------- # @author: # Tingwu Wang # @brief: # The environment wrapper # ----------------------------------------------------------------------------- import init_path from util import dm_control_util import os # os.environ['DISABLE_M...
2,241
27.74359
80
py
neural_graph_evolution
neural_graph_evolution-master/env/species_info.py
''' @brief: document the constraints of parameters for different creatures ''' import init_path import numpy as np CREATURE_ROOT_INFO = { 'fish': { 'geom_type': -1, 'u': -1, 'v': -1, 'axis_x': -233, 'axis_y': -233, 'a_size': 0.01, 'b_size': 0.08, ...
9,595
24.186352
81
py
neural_graph_evolution
neural_graph_evolution-master/env/dm_env_wrapper.py
# ----------------------------------------------------------------------------- # @author: # Tingwu Wang # @brief: # The environment wrapper for dm controller # ----------------------------------------------------------------------------- import init_path from util import dm_control_util import os impor...
3,433
28.86087
79
py
neural_graph_evolution
neural_graph_evolution-master/agent/evolution_agent.py
# ------------------------------------------------------------------------------ # @brief: # The evolutionary agent is responsible for everything. It takes the # @weights, and the @xml of the env And it output the updated weights # @author: # Tingwu Wang # -----------------------------------------...
50,276
39.545968
90
py
neural_graph_evolution
neural_graph_evolution-master/agent/init_path.py
../tool/init_path.py
20
20
20
py
neural_graph_evolution
neural_graph_evolution-master/agent/rollout_master_agent.py
# ----------------------------------------------------------------------------- # @brief: # modified from the code of kvfran # @modified: # Tingwu Wang # ----------------------------------------------------------------------------- import multiprocessing import init_path import os from util import log...
7,693
33.972727
80
py
neural_graph_evolution
neural_graph_evolution-master/agent/rollout_agent.py
# ----------------------------------------------------------------------------- # @brief: # the agent that do the sampling of trajectories. # @author: # modified from the code of kvfran, modified by Tingwu Wang # ----------------------------------------------------------------------------- import numpy...
9,676
35.794677
82
py
neural_graph_evolution
neural_graph_evolution-master/agent/optimization_agent.py
# ------------------------------------------------------------------------------ # @brief: # The optimization agent is responsible for doing the updates. # @author: # modified from the code of kvfran, modified by Tingwu Wang # -----------------------------------------------------------------------------...
42,422
40.028046
102
py