Comments (2)
Hi @jim79,
Please refer the below sample checkpoint utility functions.
You may need to consider other factors like this LR scheduler which is non-trivial. We will offer this support soon,Thanks.
def load_checkpoint(checkpoint, solver):
r"""Load the last states of the training."""
print(f"Checkpoint Loading from: {str(path)}\n")
with open(checkpoint, 'r') as file:
info = json.load(file)
path = Path(info['params_path'])
nn.load_parameters(str(path / 'model.h5'))
solver.load_states(str(path / 'solver_states.h5'))
return info['cur_epoch']
def save_checkpoint(path, solver, cur_epoch):
r"""Save the current states of the training."""
path = Path(path)
nn.save_parameters(str(path / 'model.h5'))
solver.save_states(str(path / 'solver_states.h5'))
with open(path / 'checkpoint.json', 'w') as f:
json.dump(
dict(cur_epoch=cur_epoch,
params_path=str(path),),
f
)
print(f"Checkpoint saved: {str(path)}\n")
from ai-research-code.
Thank you for the response.
from ai-research-code.
Related Issues (20)
- Chinese supported? HOT 2
- Adding additional speakers - transfer learning
- NVC-Net Training HOT 3
- [Mixed Precision DNNs]: ImageNet codebase? HOT 1
- 【NVC-Net】RuntimeError: target_specific error in backward_impl. Failed `status == CUDNN_STATUS_SUCCESS`: UNKNOWN HOT 1
- 【NVC-Net】ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory HOT 6
- 【NVC-Net】Mutli-GPU training multiple models? HOT 2
- No pretrained NVC model HOT 5
- Memory allocation failed HOT 16
- MobileNet implementation for Mixed Precision DNNs
- Segmentation fault and RuntimeError: value error in setup_impl HOT 3
- Question about Mixed Precision DNNs HOT 5
- [Quantized Depth Completion] Questions about implementation details HOT 5
- pretrained NVC model HOT 1
- NVCnet g_loss_con=0.0000 while training HOT 2
- [NVC-Net] About 16 kHz training and model convergence HOT 2
- [NVC-NET]Inference in CPU environment HOT 2
- [X-UMX] Bad performance when using --targets HOT 1
- hi,where is tvc-gmm code? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai-research-code.