Amp.load for tensorflow and tests
Issue #64
resolved
Amp.load needs to be implemented for tfAmpNN. I think it now works with the Model
keyword like
from amp import Amp
from amp.model.tfAmpNN import tfAmpNN
calc = Amp.load(filename='calc.amp', Model=tfAmpNN
So it would just need to be put into the importhelper to make this automatic without specifying the model.
However, it seems like there's also some bug in loading the descriptor currently:
135
136 # Instantiate the descriptor and model.
--> 137 descriptor = Descriptor(**p['descriptor'])
138 # ** sends all the key-value pairs at once.
139 model = Model(**p['model'])
TypeError: __init__() got an unexpected keyword argument 'cutofffn'
So perhaps we need a rigorous test too.
Comments (2)
-
-
- changed status to resolved
See comment above.
- Log in to comment
I think this issue was fixed in https://bitbucket.org/andrewpeterson/amp/commits/0162f31ba533. I have tested as follows:
I modified
test_gaussian_tflow.py
to load the createdcalc.amp
after training:Then, I run the script that gives me back these:
which loads the parameters stored in calc.amp without issues.