Skip to content

kristpapadopoulos/keras-extract-weights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Keras extract weights from model to python dictionary

The file extract_parameters.py

  • takes Keras h5py model parameter file and outputs a python dictionary with option to output as pickle file
  • extract_parameters.py --h5_path='file_path' --output_path='file_path'

Tested with:

h5py  3.1.0

Each Keras layer has a group that has members: 1 for the biases and 1 for the parameters of the layer.


Example

Output for 3 layer neural network - see dataset folder for input file.

About

Utility for extracting layer weights and biases from Keras models

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages