Beispiel #1
0
    "nRs3": 10,
    "nTs": 10,
    "rcut": 3.18,
    "acut": 3.18,
    "zeta": 52.779232035094125,
    "eta": 1.4954812022150898
}
estimator = ARMP(iterations=5283,
                 batch_size=37,
                 l1_reg=8.931599068573057e-06,
                 l2_reg=3.535679697949907e-05,
                 learning_rate=0.0008170485394812195,
                 representation_name='acsf',
                 representation_params=acsf_params,
                 tensorboard=True,
                 store_frequency=25,
                 hidden_layer_sizes=(15, 88))

estimator.set_properties(ene_isopent)
estimator.generate_representation(xyz_isopent, zs_isopent, method="fortran")

# Fitting the estimator and scoring it
estimator.fit(idx_train)
score = estimator.score(idx_test)

# Saving the model for later use
model_name = "md-nn"
estimator.save_nn(model_name)

print(score)
Beispiel #2
0
ene_true = np.array([0.5, 0.9, 1.0])

estimator = ARMP(iterations=10, l1_reg=0.0001, l2_reg=0.005, learning_rate=0.0005, representation='acsf',
                 representation_params={"radial_rs": np.arange(0, 10, 5), "angular_rs": np.arange(0, 10, 5),
                                        "theta_s": np.arange(0, 3.14, 3)},
                 tensorboard=True, store_frequency=10
                 )

estimator.set_properties(ene_true)
estimator.generate_representation(xyz, zs)

idx = list(range(xyz.shape[0]))

estimator.fit(idx)
estimator.save_nn(save_dir="temp")

pred1 = estimator.predict(idx)

estimator.loaded_model = True

estimator.fit(idx)

pred2 = estimator.predict(idx)
estimator.session.close()
tf.reset_default_graph()

new_estimator = ARMP(iterations=10, l1_reg=0.0001, l2_reg=0.005, learning_rate=0.0005, representation='acsf',
                 representation_params={"radial_rs": np.arange(0, 10, 5), "angular_rs": np.arange(0, 10, 5),
                                        "theta_s": np.arange(0, 3.14, 3)},
                    tensorboard=True, store_frequency=10