Compute Library
 21.11
caffe_data_extractor Namespace Reference

Variables

 parser = argparse.ArgumentParser('Extract Caffe net parameters')
 
 dest
 
 type
 
 str
 
 required
 
 True
 
 help
 
 args = parser.parse_args()
 
 net = caffe.Net(args.netFile, 1, weights=args.modelFile)
 
string outname = name + "_w"
 
string varname = outname
 

Detailed Description

Extracts trainable parameters from Caffe models and stores them in numpy arrays.
Usage
    python caffe_data_extractor -m path_to_caffe_model_file -n path_to_caffe_netlist

Saves each variable to a {variable_name}.npy binary file.

Tested with Caffe 1.0 on Python 2.7

Variable Documentation

◆ args

args = parser.parse_args()

Definition at line 21 of file caffe_data_extractor.py.

◆ dest

dest

Definition at line 19 of file caffe_data_extractor.py.

◆ help

help

Definition at line 19 of file caffe_data_extractor.py.

◆ net

net = caffe.Net(args.netFile, 1, weights=args.modelFile)

Definition at line 24 of file caffe_data_extractor.py.

◆ outname

string outname = name + "_w"

Definition at line 32 of file caffe_data_extractor.py.

◆ parser

parser = argparse.ArgumentParser('Extract Caffe net parameters')

Definition at line 18 of file caffe_data_extractor.py.

◆ required

required

Definition at line 19 of file caffe_data_extractor.py.

◆ str

◆ True

True

Definition at line 19 of file caffe_data_extractor.py.

◆ type

type

Definition at line 19 of file caffe_data_extractor.py.

◆ varname

string varname = outname

Definition at line 39 of file caffe_data_extractor.py.