NNmeta based on Netpack
Project description
NNmeta
NNmeta is created in order to use NNPackage.
Installation
Install with pip [PyPi]:
pip3 install nnmeta
Install from source
Clone the repository
git clone https://github.com/AlexanderDKazakov/nnmeta
cd nnmeta
Install requirements
pip3 install -r requirements.txt
Install NNmeta
pip3 install .
Usage
NNmeta support certain convention in data structure and it is required to structure the data in such way:
# /path/to/my/base
base
└── xyz
├── samples.xyz
└── samples_for_cc.xyz
After first run additional folders will be created: models, dbs, splits, tests
from nnmeta import NNClass # this is a main class for NN training
info = dict(
runner = { # network name
# data source [extended xyz file]; used for converting to DB [internal usage]
# "filename" : {"range" ex. [from:to:step], epochs should be done}
"samples.xyz" : {":" : 20}, # train `runner` nn on all samples of `samples.xyz` 20 epochs
},
runner_features = dict(
n_features = 64, # details in NN class [default is 128]
n_filters = 32, #
n_gaussians = 12, # default 25
batch_size = 512, # [parameter for tuning]
lr = 1e-4, # learning rate [parameter for tuning]
db_properties = ("energy", "forces", "dipole_moment"), # what can be found in the `samples.xyz` file
training_properties = ("energy", "forces", "dipole_moment"), # what one wants to train
loss_tradeoff = (0.2, 0.8, 0.6),
n_layers_energy_force = 2, # default 2 [parameter for tuning]
n_neurons_energy_force = None, # default None [parameter for tuning]
n_layers_dipole_moment = 2, # default 2 [parameter for tuning]
n_neurons_dipole_moment = None, # default None [parameter for tuning]
loss_function_choice = "mse", # "mae", "mse", "sae"
train_samples_percent = 70,
valid_samples_percent = 20,
predict_each_epoch = 200,
validate_each_epoch = 30,
# cross-check with next files
check_list_files = {
# this file should lie in the same `xyz` dir
"samples_for_cc.xyz" : dict(num_points = 1000),
}
)
)
nn = NNClass(info=info, network_name="runner",
system_path="/path/to/my/base")
nn.prepare_network()
Contribution
Feel free to contribute to the project, but please create initially an issue with detailed problem and way to resolve it.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nnmeta-2.0.1.tar.gz.
File metadata
- Download URL: nnmeta-2.0.1.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f685d91e81bfb43b4a3aaea37ad79884c32cdd919f6b4dbaa4491cd35c8275
|
|
| MD5 |
e1d218e35235f0b536296e0c0614a40c
|
|
| BLAKE2b-256 |
64bd0c2efbea67146eb8e2668b12fd78ccdee157c2a3447ab8b74a9af93bda2b
|
File details
Details for the file nnmeta-2.0.1-py3-none-any.whl.
File metadata
- Download URL: nnmeta-2.0.1-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1bd23d3dea0dfc68b2f156242b4bbbd4b495c08b3df6aa5f40f036972ba276d
|
|
| MD5 |
5c29af6685d889839e3315d93326ca49
|
|
| BLAKE2b-256 |
ddc38810a6036da7afbc8567535626791e1ce491c876db5831eb703493f1a017
|