repo
stringlengths
1
99
file
stringlengths
13
215
code
stringlengths
12
59.2M
file_length
int64
12
59.2M
avg_line_length
float64
3.82
1.48M
max_line_length
int64
12
2.51M
extension_type
stringclasses
1 value
tps-torch
tps-torch-main/dimer_solv/ml_test/nn_initialization.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_ftsus import FTSLayerUSCustom as FTSLayer from committor_nn im...
4,668
32.589928
181
py
tps-torch
tps-torch-main/dimer_solv/ml_test/plotmodel.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch #from brownian_ml import CommittorNet from committor_nn import CommittorNet, CommittorNetBP, CommittorNetDR import numpy as np #Import...
2,791
27.489796
112
py
tps-torch
tps-torch-main/dimer_solv/ml_test/dimer_us.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_solv_ml import MyMLEXPSampler from tpstorch import _rank, _wo...
4,070
32.097561
107
py
tps-torch
tps-torch-main/dimer_solv/ml_test/run_us_sl.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_us import DimerUS from committor_nn import CommittorNetDR from tpstorch.ml.data import EXPReweightSimulation from ...
5,785
32.062857
187
py
tps-torch
tps-torch-main/dimer_solv/ml_test/dimer_fts_nosolv.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') import scipy.spatial #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_solv_ml import MyMLFTSSampler from tpsto...
9,628
36.034615
122
py
tps-torch
tps-torch-main/dimer_solv/ml_test/committor_nn.py
#Import necessarry tools from torch import torch import torch.nn as nn import numpy as np #Import any other thing import tqdm, sys # SchNet imports from typing import Optional import os import warnings import os.path as osp from math import pi as PI import torch.nn.functional as F from torch.nn import Embedding, Se...
15,044
34.736342
107
py
tps-torch
tps-torch-main/dimer_solv/ml_test/dimer_ftsus_nosolv.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') import scipy.spatial #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_solv_ml import MyMLEXPStringSampler from...
12,403
38.129338
122
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsme/run_ftsme_r.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_fts_nosolv import dimer_reorient, DimerFTS from committor_nn imp...
7,280
40.135593
181
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsme/run_ftsme.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_fts_nosolv import dimer_reorient, DimerFTS from committor_nn imp...
6,468
43.308219
218
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsus/run_ftsus.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_ftsus_nosolv import DimerFTSUS from committor_nn import initiali...
5,510
37.538462
210
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsus/run_ftsus_r.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_ftsus_nosolv import DimerFTSUS from committor_nn import initiali...
5,652
37.455782
210
py
tps-torch
tps-torch-main/dimer_solv/ml_test/us/run_us_r.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_us import DimerUS from committor_nn import initializeConfig, CommittorNet, CommittorN...
5,262
33.625
181
py
tps-torch
tps-torch-main/dimer_solv/ml_test/us/run_us.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_us import DimerUS from committor_nn import initializeConfig, CommittorNet, CommittorN...
5,120
33.601351
181
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsus_sl/run_ftsus_sl_r.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_ftsus_nosolv import DimerFTSUS from committor_nn import initiali...
7,980
37.742718
197
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsus_sl/run_ftsus_sl.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_ftsus_nosolv import DimerFTSUS from committor_nn import initiali...
7,539
37.274112
197
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsme_sl/run_ftsme_sl_r.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_fts_nosolv import dimer_reorient, DimerFTS from committor_nn imp...
9,196
40.995434
181
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftsme_sl/run_ftsme_sl.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_fts_nosolv import dimer_reorient, DimerFTS from committor_nn imp...
8,699
40.626794
181
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftme_sl/dimer_fts_nosolv.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') import scipy.spatial #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_solv_ml import MyMLFTSSampler from tpsto...
8,134
35.644144
122
py
tps-torch
tps-torch-main/dimer_solv/ml_test/ftme_sl/run_ftsme_sl.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn import scipy.spatial #Import necessarry tools from tpstorch from dimer_fts_nosolv import DimerFTS from committor_nn import CommittorNet, CommittorNetBP, CommittorNe...
9,052
37.198312
193
py
tps-torch
tps-torch-main/dimer_solv/ml_test/us_sl/run_us_sl.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_us import DimerUS from committor_nn import initializeConfig, CommittorNet, CommittorN...
6,609
34.923913
181
py
tps-torch
tps-torch-main/dimer_solv/ml_test/us_sl/run_us_sl_r.py
import sys sys.path.append("..") import time t0 = time.time() #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_us import DimerUS from committor_nn import initializeConfig, CommittorNet, CommittorN...
7,050
35.533679
181
py
tps-torch
tps-torch-main/muller-brown/committor_test.py
import torch import numpy as np import tpstorch.fts as fts import mullerbrown as mb # Basically I will read in averaged Voronoi cells, and then determine the committor at the Voronoi cells committor_vals = np.zeros((32,)) committor_std = np.zeros((32,)) def myprod_checker(config): end = torch.tensor([[0.5,0.0]]) ...
1,828
30
104
py
tps-torch
tps-torch-main/muller-brown/test.py
import torch import tpstorch.fts import mullerbrown as mb a = mb.MySampler("param",torch.tensor([[0.0,1.0]]),0,0) #These are just mock tensors #Intepreat the MD potential as a 2D system for one particle left_weight = torch.tensor([[1.0,-1.0]]) left_bias = torch.tensor(0.0) right_weight = torch.tensor([[1.0,-1.0]]) rig...
417
31.153846
68
py
tps-torch
tps-torch-main/muller-brown/test_vor.py
import torch import tpstorch.fts as fts import mullerbrown as mb import torch.distributed as dist dist.init_process_group(backend='mpi') mygroup = dist.distributed_c10d._get_default_group() rank = dist.get_rank() #Override FTS class and modify routines as needed class CustomFTSMethod(fts.FTSMethodVor): def __init...
1,539
35.666667
151
py
tps-torch
tps-torch-main/muller-brown/test_fts.py
import torch import tpstorch.fts as fts import mullerbrown as mb import torch.distributed as dist dist.init_process_group(backend='mpi') mygroup = dist.distributed_c10d._get_default_group() rank = dist.get_rank() #Override FTS class and modify routines as needed class CustomFTSMethod(fts.FTSMethod): def __init__(...
1,384
34.512821
139
py
tps-torch
tps-torch-main/1dbrownian/fts_test/generate_validate.py
#Start up torch dist package import torch import torch.distributed as dist dist.init_process_group(backend='mpi') #Load classes for simulations and controls from brownian_fts import BrownianParticle import numpy as np #Starting and ending configuration. start = torch.tensor([[-1.0]]) end = torch.tensor([[1.0]]) def i...
2,237
38.263158
138
py
tps-torch
tps-torch-main/1dbrownian/fts_test/brownian_fts.py
#Import necessarry tools from torch import torch import torch.distributed as dist #Import necessarry tools from tpstorch #import tpstorch.fts as fts from tpstorch.fts import FTSSampler, AltFTSMethod import numpy as np #Import any other thing import tqdm, sys class BrownianParticle(FTSSampler): def __init__(self...
3,089
38.113924
149
py
tps-torch
tps-torch-main/1dbrownian/fts_test/run.py
#Start up torch dist package import torch import torch.distributed as dist dist.init_process_group(backend='mpi') #Load classes for simulations and controls from brownian_fts import BrownianParticle, CustomFTSMethod import numpy as np #Starting and ending configuration. start = torch.tensor([[-1.0]]) end = torch.tens...
891
33.307692
147
py
tps-torch
tps-torch-main/1dbrownian/ml_test/brownian_ml_fts.py
#Import necessarry tools from torch import torch import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml import MLSamplerFTS from tpstorch.ml.nn import FTSLayer from tpstorch import dist, _rank, _world_size from brownian_ml import CommittorNet import numpy as np #Import any other thing import t...
5,596
34.424051
148
py
tps-torch
tps-torch-main/1dbrownian/ml_test/brownian_ml.py
#Import necessarry tools from torch import torch import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import FTSLayer from tpstorch import dist, _rank, _world_size import numpy as np #Import any other thing import tqdm, sys #The Neural Network for 1D...
12,395
39.37785
194
py
tps-torch
tps-torch-main/1dbrownian/ml_test/run_vanilla.py
#Import necessarry tools from torch import torch import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation from tpstorch.ml.optim import ParallelAdam, ParallelSGD from tpstorch.ml.nn import BKELossEXP, BKELossFTS #Import model-specific classes from brownian_ml im...
3,912
32.732759
163
py
tps-torch
tps-torch-main/1dbrownian/ml_test/run_cl.py
#Import necessarry tools from torch import torch import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation from tpstorch.ml.optim import ParallelAdam, ParallelSGD from tpstorch.ml.nn import BKELossEXP, BKELossFTS, CommittorLoss2 from brownian_ml import CommittorNe...
4,611
33.939394
185
py
tps-torch
tps-torch-main/1dbrownian/ml_test/plot.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.ticker import AutoMinorLocator mpl.rcParams['text.usetex'] = True params= {'text.latex.preamble' : [r...
2,752
25.728155
115
py
tps-torch
tps-torch-main/1dbrownian/ml_test/run_fts.py
#Import necessarry tools from torch import torch import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import FTSSimulation from tpstorch.ml.optim import ParallelAdam, FTSUpdate, ParallelSGD from tpstorch.ml.nn import BKELossFTS, FTSCommittorLoss, FTSLayer from brownian_ml_fts import Comm...
4,850
35.473684
207
py
tps-torch
tps-torch-main/1dbrownian/ml_test/run_fts_cl.py
#Import necessarry tools from torch import torch import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import FTSSimulation from tpstorch.ml.optim import ParallelAdam, FTSUpdate, ParallelSGD from tpstorch.ml.nn import BKELossFTS, FTSCommittorLoss, CommittorLoss2, FTSLayer from brownian_ml...
5,616
35.474026
239
py
tps-torch
tps-torch-main/muller-brown-ml/mullerbrown_prod.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.optim import project_simplex from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import CommittorLossEXP from mul...
13,332
43.591973
297
py
tps-torch
tps-torch-main/muller-brown-ml/plot_tricky.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist dist.init_process_group('mpi') #Import necessarry tools from tpstorch from mullerbrown import CommittorNet import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,...
1,485
27.037736
92
py
tps-torch
tps-torch-main/muller-brown-ml/test.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation, TSTValidation from tpstorch.ml.optim import UnweightedSGD, EXPReweightSGD from torc...
6,259
35.823529
171
py
tps-torch
tps-torch-main/muller-brown-ml/mb_fts.py
#Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.mullerbrown_ml import MyMLFTSSampler from tpstorch import _rank, _world_size import numpy as np #Import any other thing import tqdm, sys #A single hi...
4,992
32.965986
108
py
tps-torch
tps-torch-main/muller-brown-ml/mullerbrown.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.optim import project_simplex from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import CommittorLossEXP from mul...
4,508
36.264463
121
py
tps-torch
tps-torch-main/muller-brown-ml/run_fts_c.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from mb_fts import MullerBrown, CommittorNet from tpstorch.ml.data import...
6,959
38.101124
239
py
tps-torch
tps-torch-main/muller-brown-ml/test_sampler_2.py
import mullerbrown_ml as mb import torch import torch.distributed as dist from torch.distributed import distributed_c10d dist.init_process_group(backend='mpi') mpi_group = dist.distributed_c10d._get_default_group() a = mb.MySampler('param_tst',torch.tensor([[0.5,0.5]]),0,0,2.0,0.0,distributed_c10d._get_default_group...
504
30.5625
105
py
tps-torch
tps-torch-main/muller-brown-ml/run_fts_c2.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from mb_fts import MullerBrown, CommittorNet from tpstorch.ml.data import...
7,612
39.068421
271
py
tps-torch
tps-torch-main/muller-brown-ml/run_vanilla.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from mb_ml import MullerBrown, CommittorNet from tpstorch.ml.data import ...
5,494
36.128378
180
py
tps-torch
tps-torch-main/muller-brown-ml/test_sampler.py
import mullerbrown_ml as mb import torch import torch.distributed as dist dist.init_process_group(backend='mpi') mpi_group = dist.distributed_c10d._get_default_group() a = mb.MySampler('param',torch.tensor([[0.0,0.0]]),0,0,0.0,0.0,dist.distributed_c10d._get_default_group())
277
29.888889
106
py
tps-torch
tps-torch-main/muller-brown-ml/plot_tricky_string.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist #Import necessarry tools from tpstorch from mb_fts import CommittorNet from tpstorch.ml.nn import FTSLayer import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,...
1,831
29.032787
92
py
tps-torch
tps-torch-main/muller-brown-ml/run_cl.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from mb_ml import MullerBrown, CommittorNet from tpstorch.ml.data import ...
6,208
37.565217
185
py
tps-torch
tps-torch-main/muller-brown-ml/test_prod.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation, EXPReweightSimulationManual, TSTValidation from tpstorch.ml.optim import Unweighted...
10,128
39.678715
401
py
tps-torch
tps-torch-main/muller-brown-ml/plot.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist dist.init_process_group('mpi') #Import necessarry tools from tpstorch from mullerbrown import CommittorNet import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,...
1,220
22.037736
84
py
tps-torch
tps-torch-main/muller-brown-ml/mb_ml.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml import MLSamplerEXP from tpstorch.examples.mullerbrown_ml import MyMLSampler import numpy as np #Import any other thi...
4,567
33.345865
108
py
tps-torch
tps-torch-main/muller-brown-ml/mullerbrown_tricky.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.optim import project_simplex from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import CommittorLossEXP from mul...
4,466
36.225
104
py
tps-torch
tps-torch-main/muller-brown-ml/run_fts.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from mb_fts import MullerBrown, CommittorNet from tpstorch.ml.data import...
6,865
37.79096
239
py
tps-torch
tps-torch-main/muller-brown-ml/test_tricky.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation, EXPReweightSimulationManual, TSTValidation from tpstorch.ml.optim import Unweighted...
7,966
38.835
213
py
tps-torch
tps-torch-main/muller-brown-ml/mullerbrown_relu.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.optim import project_simplex from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import CommittorLossEXP from mul...
5,015
37.290076
121
py
tps-torch
tps-torch-main/muller-brown-ml/test_relu.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation, TSTValidation from tpstorch.ml.optim import UnweightedSGD, EXPReweightSGD from torc...
7,861
38.114428
213
py
tps-torch
tps-torch-main/muller-brown-ml/mrh_tests/mb_fts.py
#Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.mullerbrown_ml import MyMLFTSSampler from tpstorch import _rank, _world_size import numpy as np #Import any other thing import tqdm, sys #A single hi...
4,995
32.986395
108
py
tps-torch
tps-torch-main/muller-brown-ml/mrh_tests/run_vanilla.py
#Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from mb_ml import MullerBrown, CommittorNet from tpstorch.ml.data import EXPReweightSimulation from tpstorch.ml.optim import ParallelSGD, ParallelAdam from tps...
5,413
36.337931
180
py
tps-torch
tps-torch-main/muller-brown-ml/mrh_tests/mb_ml.py
#Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml import MLSamplerEXP from tpstorch.examples.mullerbrown_ml import MyMLSampler import numpy as np #Import any other thing import tqdm, sys #dist.init_process_...
4,527
33.30303
108
py
tps-torch
tps-torch-main/muller-brown-ml/mrh_tests/run_fts.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from mb_fts import MullerBrown, CommittorNet from tpstorch.ml.data import...
7,051
39.068182
240
py
tps-torch
tps-torch-main/muller-brown-ml/examples/0/mullerbrown.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.optim import project_simplex from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import CommittorLossEXP from mul...
4,579
36.235772
104
py
tps-torch
tps-torch-main/muller-brown-ml/examples/0/run.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation, TSTValidation from tpstorch.ml.optim import UnweightedSGD, EXPReweightSGD from torc...
6,698
36.216667
175
py
tps-torch
tps-torch-main/muller-brown-ml/examples/2/mullerbrown.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.optim import project_simplex from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import CommittorLossEXP from mul...
4,466
36.225
104
py
tps-torch
tps-torch-main/muller-brown-ml/examples/2/run.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation, TSTValidation from tpstorch.ml.optim import UnweightedSGD, EXPReweightSGD from torc...
6,699
36.222222
175
py
tps-torch
tps-torch-main/muller-brown-ml/examples/1/mullerbrown.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.optim import project_simplex from tpstorch.ml import MLSamplerEXP from tpstorch.ml.nn import CommittorLossEXP from mul...
4,466
36.225
104
py
tps-torch
tps-torch-main/muller-brown-ml/examples/1/run.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.ml.data import EXPReweightSimulation, TSTValidation from tpstorch.ml.optim import UnweightedSGD, EXPReweightSGD from torc...
6,699
36.222222
175
py
tps-torch
tps-torch-main/muller-brown-ml/analysis_scripts/plot_tricky_2.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist from torch.autograd import grad #Import necessarry tools from tpstorch from mb_ml import CommittorNet import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,num_n...
2,969
31.637363
100
py
tps-torch
tps-torch-main/muller-brown-ml/analysis_scripts/plot_tricky.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist dist.init_process_group('mpi') #Import necessarry tools from tpstorch from mullerbrown import CommittorNet import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,...
1,507
27.45283
106
py
tps-torch
tps-torch-main/muller-brown-ml/analysis_scripts/plot_tricky_string_2.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist from torch.autograd import grad #Import necessarry tools from tpstorch from mb_fts import CommittorNet from tpstorch.ml.nn import FTSLayer import numpy as np #Import any other thing import tqdm, sys #Initialize neural n...
3,195
32.291667
100
py
tps-torch
tps-torch-main/muller-brown-ml/analysis_scripts/plot_tricky_t.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist dist.init_process_group('mpi') #Import necessarry tools from tpstorch from mullerbrown import CommittorNet import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,...
1,511
27.528302
106
py
tps-torch
tps-torch-main/muller-brown-ml/analysis_scripts/plot_tricky_string.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist #Import necessarry tools from tpstorch from mb_fts import CommittorNet from tpstorch.ml.nn import FTSLayer import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,...
1,831
29.032787
92
py
tps-torch
tps-torch-main/muller-brown-ml/analysis_scripts/energies.py
import numpy as np import matplotlib.pyplot as plt import torch import torch.distributed as dist from torch.autograd import grad #Import necessarry tools from tpstorch from mb_ml import CommittorNet import numpy as np #Import any other thing import tqdm, sys #Initialize neural net committor = CommittorNet(d=2,num_n...
2,741
31.258824
93
py
tps-torch
tps-torch-main/tpstorch/__init__.py
#Always initialize MPI when importing this module import torch import torch.distributed as dist dist.init_process_group(backend='mpi') #Save the MPI group, rank, and size _mpi_group = dist.distributed_c10d._get_default_group() _rank = dist.get_rank() _world_size = dist.get_world_size() from . import _tpstorch from . ...
2,980
40.985915
111
py
tps-torch
tps-torch-main/tpstorch/fts/__init__.py
import tpstorch import torch import torch.distributed as dist from tpstorch.fts import _fts #A class that interfaces with an existing MD/MC code. Its main job is to streamline #An existing MD code with an FTS method Class. class FTSSampler(_fts.FTSSampler): pass #Class for Handling Finite-Temperature String Met...
25,508
50.742394
178
py
tps-torch
tps-torch-main/tpstorch/examples/mullerbrown_ml/__init__.py
from tpstorch.ml import _ml from . import _mullerbrown_ml #Just something to pass the class class MyMLSampler(_mullerbrown_ml.MySampler): pass #Just something to pass the class class MyMLEXPStringSampler(_mullerbrown_ml.MySamplerEXPString): pass #Just something to pass the class class MyMLFTSSampler(_mullerbr...
351
24.142857
63
py
tps-torch
tps-torch-main/tpstorch/examples/dimer_ml/__init__.py
from tpstorch.ml import _ml from . import _dimer_ml #Just something to pass the class class MyMLEXPSampler(_dimer_ml.DimerEXP): pass class MyMLEXPStringSampler(_dimer_ml.DimerEXPString): pass class MyMLFTSSampler(_dimer_ml.DimerFTS): pass
254
18.615385
53
py
tps-torch
tps-torch-main/tpstorch/examples/dimer_solv_ml/__init__.py
from tpstorch.ml import _ml from . import _dimer_solv_ml #Just something to pass the class class MyMLEXPSampler(_dimer_solv_ml.DimerSolvEXP): pass class MyMLEXPStringSampler(_dimer_solv_ml.DimerSolvEXPString): pass class MyMLFTSSampler(_dimer_solv_ml.DimerSolvFTS): pass
286
21.076923
62
py
tps-torch
tps-torch-main/tpstorch/ml/deprecated.py
""" A place to put classes and method which we will discard for all future implementations. We'll still include in case we want to revert back """ import torch from torch.optim import Optimizer from torch.optim.optimizer import required from torch.utils.data import IterableDataset import torch.distributed as dist impo...
14,663
43.302115
186
py
tps-torch
tps-torch-main/tpstorch/ml/optim.py
import torch from torch.optim import Optimizer from torch.optim.optimizer import required from tpstorch import _rank, _world_size from tpstorch import dist # Stolen adam implementation from PyTorch, weird *, operator kills us everytime import math from torch import Tensor from typing import List, Optional def adam(pa...
20,999
43.680851
170
py
tps-torch
tps-torch-main/tpstorch/ml/data.py
import torch import numpy as np from tpstorch import _rank, _world_size class FTSSimulation: def __init__(self, sampler, batch_size, dimN, period=10,mode='nonadaptive', committor = None, nn_training=True,**kwargs):#, nn_training=True): ## Store the MD/MC Simulator, which samples our data self.sampl...
17,425
41.921182
157
py
tps-torch
tps-torch-main/tpstorch/ml/nn.py
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.nn.modules.loss import _Loss #import scipy.sparse.linalg from tpstorch import _rank, _world_size from tpstorch import dist from numpy.linalg import svd import scipy.linalg #Helper function to obtain null space def nul...
64,002
44.586182
212
py
tps-torch
tps-torch-main/tpstorch/ml/__init__.py
from . import _ml, optim, nn, data from tpstorch import _mpi_group #Inherit the C++ compiled sampler class, and add the MPI process group by default class MLSamplerEXP(_ml.MLSamplerEXP): def __init__(self, initial_config): super(MLSamplerEXP,self).__init__(initial_config, _mpi_group) #Inherit the C++ comp...
1,030
43.826087
81
py
tps-torch
tps-torch-main/dimer/fts_test/dimer_fts.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_ml import MyMLFTSSampler from tpstorch import _rank, _world_s...
7,580
34.425234
118
py
tps-torch
tps-torch-main/dimer/fts_test/fts_simulation.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch #from mb_fts import MullerBrown as MullerBrownFTS#, CommittorNet from dim...
5,130
33.206667
207
py
tps-torch
tps-torch-main/dimer/ml_test/nn_initialization.py
#import sys #sys.path.insert(0,"/global/home/users/muhammad_hasyim/tps-torch/build") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_ftsus import FTSLayerUSCustom as FTSLayer from committor_nn im...
3,069
29.7
156
py
tps-torch
tps-torch-main/dimer/ml_test/plotmodel.py
#Import necessarry tools from torch import torch import torch.distributed as dist from torch.utils.data import DataLoader import torch.nn as nn #Import necessarry tools from tpstorch #from brownian_ml import CommittorNet from committor_nn import CommittorNet, CommittorNetDR import numpy as np #Import any other thing...
1,397
22.694915
82
py
tps-torch
tps-torch-main/dimer/ml_test/committor_nn.py
#Import necessarry tools from torch import torch import torch.nn as nn import numpy as np #Import any other thing import tqdm, sys class CommittorNet(nn.Module): def __init__(self, d, num_nodes, unit=torch.relu): super(CommittorNet, self).__init__() self.num_nodes = num_nodes self.d = d ...
2,015
28.647059
62
py
tps-torch
tps-torch-main/dimer/ml_test/ftsme/dimer_fts.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_ml import MyMLFTSSampler from tpstorch import _rank, _world_s...
7,906
34.457399
118
py
tps-torch
tps-torch-main/dimer/ml_test/ftsme/run_ftsme.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_fts import DimerFTS from committor_nn import CommittorNet, CommittorNetDR from dimer_fts import FTSLayerCustom as ...
6,330
34.768362
210
py
tps-torch
tps-torch-main/dimer/ml_test/ftsus/run_ftsus.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_ftsus import DimerFTSUS from committor_nn import CommittorNet, CommittorNetDR from dimer_ftsus import FTSLayerUSCu...
4,082
32.195122
225
py
tps-torch
tps-torch-main/dimer/ml_test/ftsus/dimer_ftsus.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_ml import MyMLEXPStringSampler from tpstorch import _rank, _w...
10,322
36.538182
142
py
tps-torch
tps-torch-main/dimer/ml_test/us/dimer_us.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_ml import MyMLEXPSampler from tpstorch import _rank, _world_s...
4,046
32.172131
107
py
tps-torch
tps-torch-main/dimer/ml_test/us/run_us.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_us import DimerUS from committor_nn import CommittorNetDR from tpstorch.ml.data import EXPReweightSimulation from ...
3,591
29.700855
187
py
tps-torch
tps-torch-main/dimer/ml_test/ftsus_sl/dimer_ftsus.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_ml import MyMLEXPStringSampler from tpstorch import _rank, _w...
10,322
36.538182
142
py
tps-torch
tps-torch-main/dimer/ml_test/ftsus_sl/run_ftsus_sl.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_ftsus import DimerFTSUS from committor_nn import CommittorNet, CommittorNetDR from dimer_ftsus import FTSLayerUSCu...
5,023
33.176871
225
py
tps-torch
tps-torch-main/dimer/ml_test/ftsme_sl/dimer_fts.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_ml import MyMLFTSSampler from tpstorch import _rank, _world_s...
7,906
34.457399
118
py
tps-torch
tps-torch-main/dimer/ml_test/ftsme_sl/run_ftsme_sl.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_fts import DimerFTS from committor_nn import CommittorNet, CommittorNetDR from dimer_fts import FTSLayerCustom as ...
7,300
35.323383
210
py
tps-torch
tps-torch-main/dimer/ml_test/us_sl/dimer_us.py
import sys sys.path.insert(0,'/global/home/users/muhammad_hasyim/tps-torch/build/') #Import necessarry tools from torch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from tpstorch.examples.dimer_ml import MyMLEXPSampler from tpstorch import _rank, _world_s...
4,046
32.172131
107
py
tps-torch
tps-torch-main/dimer/ml_test/us_sl/run_us_sl.py
import sys sys.path.append("..") #Import necessarry tools from torch import tpstorch import torch import torch.distributed as dist import torch.nn as nn #Import necessarry tools from tpstorch from dimer_us import DimerUS from committor_nn import CommittorNetDR from tpstorch.ml.data import EXPReweightSimulation from ...
4,555
31.542857
187
py
AutoAE
AutoAE-master/attack_ops.py
import numpy as np from itertools import product, repeat import PIL import torch import torch.nn as nn from torch.autograd import Variable from torch.nn import functional as F from torchvision import transforms from tv_utils import SpatialAffine, GaussianSmoothing from attack_utils import projection_linf, check_shape, ...
96,677
40.017395
212
py
AutoAE
AutoAE-master/get_robust_accuracy_by_AutoAE.py
import sys import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" import torch import torch.nn as nn from torch.nn import functional as F from PIL import Image import numpy as np import torchvision import imageio from torchvision import transforms import argparse from attack_ops import apply_attacker from tqdm import tq...
12,604
41.728814
175
py