Skip to content

Commit

Permalink
continue keras core integration
Browse files Browse the repository at this point in the history
  • Loading branch information
PatReis committed Sep 12, 2023
1 parent 50e856a commit 0d37c32
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 103 deletions.
12 changes: 6 additions & 6 deletions kgcnn/layers_core/casting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ def __init__(self, reverse_indices: bool = True, dtype_batch: str = "int64", dty
def build(self, input_shape):
self.built = True

# def compute_output_shape(self, input_shape):
# out_shape = [tuple([None] + list(input_shape[0][2:])), tuple(list(reversed(input_shape[1][2:])) + [None]),
# (None, ), (None, ), (None, ), (None, )]
# if len(input_shape) == 5:
# out_shape = out_shape + [tuple([None] + list(input_shape[4][2:]))]
# return out_shape
def compute_output_shape(self, input_shape):
out_shape = [tuple([None] + list(input_shape[0][2:])), tuple(list(reversed(input_shape[1][2:])) + [None]),
(None, ), (None, ), (None, ), (None, )]
if len(input_shape) == 5:
out_shape = out_shape + [tuple([None] + list(input_shape[4][2:]))]
return out_shape

def call(self, inputs: list, **kwargs):
"""Changes node and edge indices into a Pytorch Geometric (PyG) compatible tensor format.
Expand Down
192 changes: 96 additions & 96 deletions training_core/results/ESOLDataset/GCN/GCN_ESOLDataset_score.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cuda_device_id: '[0]'
cuda_device_memory: '[None]'
cuda_device_name: '[CpuDevice(id=0)]'
data_unit: mol/L
date_time: '2023-09-12 18:43:51'
date_time: '2023-09-12 21:03:25'
epochs:
- 800
- 800
Expand All @@ -21,134 +21,134 @@ learning_rate:
- 5.1727271056734025e-05
- 5.1727271056734025e-05
loss:
- 0.03053712472319603
- 0.03404470160603523
- 0.03311067447066307
- 0.033033594489097595
- 0.03143709525465965
- 0.00792025402188301
- 0.006590294186025858
- 0.006993017625063658
- 0.007251580711454153
- 0.006051043514162302
max_learning_rate:
- 0.0010000000474974513
- 0.0010000000474974513
- 0.0010000000474974513
- 0.0010000000474974513
- 0.0010000000474974513
max_loss:
- 0.9184737801551819
- 0.8267390131950378
- 0.7701554894447327
- 0.8929275870323181
- 0.9780256748199463
- 0.7399367690086365
- 0.7787116765975952
- 0.7362247109413147
- 0.746759295463562
- 0.7478669285774231
max_scaled_mean_absolute_error:
- 1.935563087463379
- 1.766575574874878
- 1.6337051391601562
- 1.8669281005859375
- 2.0824332237243652
- 1.559438705444336
- 1.6493414640426636
- 1.552951693534851
- 1.5516891479492188
- 1.5752543210983276
max_scaled_root_mean_squared_error:
- 2.5540788173675537
- 2.321408748626709
- 2.1065993309020996
- 2.452350616455078
- 2.6977622509002686
- 1.9471094608306885
- 2.0383682250976562
- 1.9751776456832886
- 1.9169267416000366
- 1.9841108322143555
max_val_loss:
- 0.3772163987159729
- 0.3763466477394104
- 0.33287692070007324
- 0.4974099397659302
- 0.4094856083393097
- 0.3663228154182434
- 0.28135818243026733
- 0.2604922950267792
- 0.3463272452354431
- 0.2831464111804962
max_val_scaled_mean_absolute_error:
- 0.8177486062049866
- 0.8109288811683655
- 0.6679871678352356
- 0.988940954208374
- 0.801365852355957
- 0.681861162185669
- 0.6179633736610413
- 0.5706941485404968
- 0.767947256565094
- 0.6493294835090637
max_val_scaled_root_mean_squared_error:
- 1.0927287340164185
- 1.0821540355682373
- 0.8984454870223999
- 1.239497184753418
- 1.056252121925354
- 0.9045349955558777
- 0.8067713975906372
- 0.8043506145477295
- 0.9821418523788452
- 0.8277956247329712
min_learning_rate:
- 5.1727271056734025e-05
- 5.1727271056734025e-05
- 5.1727271056734025e-05
- 5.1727271056734025e-05
- 5.1727271056734025e-05
min_loss:
- 0.03053712472319603
- 0.03404470160603523
- 0.03311067447066307
- 0.03280334919691086
- 0.030585210770368576
- 0.00792025402188301
- 0.006535761523991823
- 0.006993017625063658
- 0.007251580711454153
- 0.006009226199239492
min_scaled_mean_absolute_error:
- 0.0633389949798584
- 0.07146354764699936
- 0.07079430669546127
- 0.06939832121133804
- 0.0653739720582962
- 0.016499830409884453
- 0.013694736175239086
- 0.01500233355909586
- 0.014877821318805218
- 0.012759298086166382
min_scaled_root_mean_squared_error:
- 0.16624480485916138
- 0.1832047998905182
- 0.18838366866111755
- 0.1890300065279007
- 0.17916052043437958
- 0.08597828447818756
- 0.05407874658703804
- 0.06160563975572586
- 0.0653759092092514
- 0.06261409819126129
min_val_loss:
- 0.22608399391174316
- 0.22066998481750488
- 0.21403798460960388
- 0.2186526656150818
- 0.20758692920207977
- 0.21242237091064453
- 0.17710162699222565
- 0.1991511583328247
- 0.19857510924339294
- 0.17821429669857025
min_val_scaled_mean_absolute_error:
- 0.4922861158847809
- 0.4800896644592285
- 0.48117125034332275
- 0.5147459506988525
- 0.45930004119873047
- 0.45789268612861633
- 0.3922848701477051
- 0.4110643267631531
- 0.4592127799987793
- 0.41481074690818787
min_val_scaled_root_mean_squared_error:
- 0.718582272529602
- 0.6697787046432495
- 0.7009758353233337
- 0.7098767757415771
- 0.6274582743644714
- 0.6795117259025574
- 0.5432382822036743
- 0.5837650299072266
- 0.6378938555717468
- 0.5750080347061157
model_class: make_model
model_name: GCN
model_version: 2023.09.30
multi_target_indices: null
number_histories: 5
scaled_mean_absolute_error:
- 0.0633389949798584
- 0.07158304750919342
- 0.07079430669546127
- 0.06939832121133804
- 0.0659930482506752
- 0.016499830409884453
- 0.013694736175239086
- 0.01500233355909586
- 0.014877821318805218
- 0.012759298086166382
scaled_root_mean_squared_error:
- 0.16624480485916138
- 0.183350071310997
- 0.18849699199199677
- 0.189775288105011
- 0.18083412945270538
- 0.08615948259830475
- 0.05407874658703804
- 0.0617983303964138
- 0.06539694964885712
- 0.06261409819126129
seed: 42
time_list:
- '0:01:33.268670'
- '0:01:30.225590'
- '0:01:31.639611'
- '0:01:37.904172'
- '0:01:42.706901'
- '0:09:12.199272'
- '0:09:02.642175'
- '0:08:50.004458'
- '0:08:49.564425'
- '0:08:55.888719'
val_loss:
- 0.23893700540065765
- 0.23162303864955902
- 0.2550176978111267
- 0.22663560509681702
- 0.23079481720924377
- 0.2157980352640152
- 0.18899810314178467
- 0.227281391620636
- 0.2007928490638733
- 0.22787317633628845
val_scaled_mean_absolute_error:
- 0.5077677369117737
- 0.5055126547813416
- 0.503480076789856
- 0.5220910310745239
- 0.48052480816841125
- 0.4678114950656891
- 0.4291474223136902
- 0.42943617701530457
- 0.4676350951194763
- 0.4355566203594208
val_scaled_root_mean_squared_error:
- 0.7481772303581238
- 0.7289010286331177
- 0.7459499835968018
- 0.7468581795692444
- 0.6586126089096069
- 0.6971635222434998
- 0.5815123915672302
- 0.6085444688796997
- 0.6567957997322083
- 0.6188478469848633
2 changes: 1 addition & 1 deletion training_core/results/ESOLDataset/GCN/GCN_hyper.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"model": {"class_name": "make_model", "module_name": "kgcnn.literature_core.GCN", "config": {"name": "GCN", "inputs": [{"shape": [null, 41], "name": "node_attributes", "dtype": "float32"}, {"shape": [null, 1], "name": "edge_weights", "dtype": "float32"}, {"shape": [null, 2], "name": "edge_indices", "dtype": "int64"}, {"shape": [], "name": "total_nodes", "dtype": "int64"}, {"shape": [], "name": "total_edges", "dtype": "int64"}], "cast_disjoint_kwargs": {"padded_disjoint": true}, "input_node_embedding": {"input_dim": 95, "output_dim": 64}, "input_edge_embedding": {"input_dim": 25, "output_dim": 1}, "gcn_args": {"units": 140, "use_bias": true, "activation": "relu"}, "depth": 0, "verbose": 10, "output_embedding": "graph", "output_mlp": {"use_bias": [true, true, false], "units": [140, 70, 1], "activation": ["relu", "relu", "linear"]}}}, "training": {"fit": {"batch_size": 32, "epochs": 800, "validation_freq": 10, "verbose": 2, "callbacks": [{"class_name": "kgcnn>LinearLearningRateScheduler", "config": {"learning_rate_start": 0.001, "learning_rate_stop": 5e-05, "epo_min": 250, "epo": 800, "verbose": 0}}]}, "compile": {"optimizer": {"class_name": "Adam", "config": {"learning_rate": 0.001}}, "loss": "mean_absolute_error"}, "cross_validation": {"class_name": "KFold", "config": {"n_splits": 5, "random_state": 42, "shuffle": true}}, "scaler": {"class_name": "StandardScaler", "config": {"with_std": true, "with_mean": true, "copy": true}}}, "dataset": {"class_name": "ESOLDataset", "module_name": "kgcnn.data.datasets.ESOLDataset", "config": {}, "methods": [{"set_attributes": {}}, {"map_list": {"method": "normalize_edge_weights_sym"}}, {"map_list": {"method": "count_nodes_and_edges"}}]}, "data": {"data_unit": "mol/L"}, "info": {"postfix": "", "postfix_file": "", "kgcnn_version": "4.0.0"}}
{"model": {"class_name": "make_model", "module_name": "kgcnn.literature_core.GCN", "config": {"name": "GCN", "inputs": [{"shape": [null, 41], "name": "node_attributes", "dtype": "float32"}, {"shape": [null, 1], "name": "edge_weights", "dtype": "float32"}, {"shape": [null, 2], "name": "edge_indices", "dtype": "int64"}, {"shape": [], "name": "total_nodes", "dtype": "int64"}, {"shape": [], "name": "total_edges", "dtype": "int64"}], "cast_disjoint_kwargs": {"padded_disjoint": true}, "input_node_embedding": {"input_dim": 95, "output_dim": 64}, "input_edge_embedding": {"input_dim": 25, "output_dim": 1}, "gcn_args": {"units": 140, "use_bias": true, "activation": "relu"}, "depth": 5, "verbose": 10, "output_embedding": "graph", "output_mlp": {"use_bias": [true, true, false], "units": [140, 70, 1], "activation": ["relu", "relu", "linear"]}}}, "training": {"fit": {"batch_size": 32, "epochs": 800, "validation_freq": 10, "verbose": 2, "callbacks": [{"class_name": "kgcnn>LinearLearningRateScheduler", "config": {"learning_rate_start": 0.001, "learning_rate_stop": 5e-05, "epo_min": 250, "epo": 800, "verbose": 0}}]}, "compile": {"optimizer": {"class_name": "Adam", "config": {"learning_rate": 0.001}}, "loss": "mean_absolute_error"}, "cross_validation": {"class_name": "KFold", "config": {"n_splits": 5, "random_state": 42, "shuffle": true}}, "scaler": {"class_name": "StandardScaler", "config": {"with_std": true, "with_mean": true, "copy": true}}}, "dataset": {"class_name": "ESOLDataset", "module_name": "kgcnn.data.datasets.ESOLDataset", "config": {}, "methods": [{"set_attributes": {}}, {"map_list": {"method": "normalize_edge_weights_sym"}}, {"map_list": {"method": "count_nodes_and_edges"}}]}, "data": {"data_unit": "mol/L"}, "info": {"postfix": "", "postfix_file": "", "kgcnn_version": "4.0.0"}}

0 comments on commit 0d37c32

Please sign in to comment.