Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Changelog

## [0.1.2](https://github.com/brsynth/amn_library/tree/0.1.2) (2026-03-31)

[Full Changelog](https://github.com/brsynth/amn_library/compare/0.1.1...0.1.2)

## [0.1.1](https://github.com/brsynth/amn_library/tree/0.1.1) (2026-03-30)

[Full Changelog](https://github.com/brsynth/amn_library/compare/0.1.0...0.1.1)

**Merged pull requests:**

- v0.1.1 [\#2](https://github.com/brsynth/amn_library/pull/2) ([ramez17khaled](https://github.com/ramez17khaled))

## [0.1.0](https://github.com/brsynth/amn_library/tree/0.1.0) (2026-03-30)

[Full Changelog](https://github.com/brsynth/amn_library/compare/df1d126ffc9bc50ceed7a9fc4d66d1fa7e41490f...0.1.0)

**Merged pull requests:**

- init amn [\#1](https://github.com/brsynth/amn_library/pull/1) ([ramez17khaled](https://github.com/ramez17khaled))



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
22 changes: 11 additions & 11 deletions amn/Build_Model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
def sharp_sigmoid(x):
# Custom activation function
return K.sigmoid(10000.0 * x)
from tensorflow.keras.utils import get_custom_objects, CustomObjectScope
from tensorflow.keras.layers import Activation, Lambda
from keras.utils import get_custom_objects, CustomObjectScope
from keras.layers import Activation, Lambda
get_custom_objects().update({'sharp_sigmoid': Activation(sharp_sigmoid)})

def my_mse(y_true, y_pred):
Expand Down Expand Up @@ -55,7 +55,7 @@ def CROP(dimension, start, end):
# Crops (or slices) a Tensor on a given dimension from start to end
# example : to crop tensor x[:, :, 5:10]
# call x = crop(2,5,10)(x) to slice the second dimension
from tensorflow.keras.layers import Lambda
from keras.layers import Lambda
def func(x):
if dimension == 0:
return x[start: end]
Expand Down Expand Up @@ -165,9 +165,9 @@ def Loss_all(V, Vinko, Vout, parameter):
# Dense model
# ##############################################################################

from tensorflow.keras.layers import Input, Dense, Dropout, Flatten, Activation, BatchNormalization
from tensorflow.keras.layers import Reshape, multiply
from tensorflow.keras.layers import concatenate, add, subtract, dot
from keras.layers import Input, Dense, Dropout, Flatten, Activation, BatchNormalization
from keras.layers import Reshape, multiply
from keras.layers import concatenate, add, subtract, dot

def input_ANN_Dense(parameter, verbose=False):
# Shape X and Y depending on the model used
Expand All @@ -180,7 +180,7 @@ def input_ANN_Dense(parameter, verbose=False):

def Dense_layers(inputs, parameter, trainable=True, verbose=False):
# Build a dense architecture with some hidden layers
from tensorflow.keras.regularizers import l2
from keras.regularizers import l2

activation=parameter.activation
n_hidden=parameter.n_hidden
Expand Down Expand Up @@ -614,9 +614,9 @@ def train_evaluate_model(parameter, failure=0, temperature=0, verbose=False):
# ##############################################################################

from amn.Build_Dataset import TrainingSet
from tensorflow.keras.models import load_model
from tensorflow.keras.models import Model
from tensorflow.keras.models import model_from_json
from keras.models import load_model
from keras.models import Model
from keras.models import model_from_json

from sklearn.metrics import r2_score
from sklearn.metrics import accuracy_score, f1_score, matthews_corrcoef
Expand Down Expand Up @@ -760,7 +760,7 @@ def save(self, filename, verbose=False):
h.write(s)
self.model.save(filemodel)

def load(self, filename, fileparam, filemodel, output_dim=-1, verbose=False):
def load(self, filename, fileparam=None, filemodel=None, output_dim=-1, verbose=False):
if filename == "" or filename is None:
fileparam = fileparam
filemodel = filemodel
Expand Down
2 changes: 1 addition & 1 deletion amn/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.3"
6 changes: 3 additions & 3 deletions environment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: reservoir
name: test_reservoir
channels:
- defaults
- conda-forge

dependencies:
- python =3.8
- python =3.11
- numpy =1.23.5
- pandas
- matplotlib
Expand All @@ -16,6 +16,6 @@ dependencies:
- typing_extensions =4.5.0
- pip
- ipykernel
- tensorflow =2.4.1
- tensorflow =2.12.1
- tensorflow-probability
- importlib-resources
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ def get_version():
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires = '>=3.8',
python_requires = '>=3.11',
)
Binary file modified tests/data/IJN1463EXP_AMN_QP_model.h5
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/data/IJN1463EXP_AMN_QP_param.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
./Dataset_input/Putida/IJN1463EXP,AMN_QP,3,['BIOMASS_KT2440_WT3'],1,174,4038,1,500,sigmoid,500,accuracy_score,0.001,0.25,10,0,5
/home/rkhaled/amn_library/amn/models/IJN1463EXP,AMN_QP,3,['BIOMASS_KT2440_WT3'],1,174,4038,1,500,relu,500,r2_score,0.001,0.25,10,0,5
Loading