tensorflow预训练参数解析

来源:互联网 发布:女士西装品牌知乎 编辑:程序博客网 时间:2024/06/18 04:40
from tensorflow.python import pywrap_tensorflowreader=pywrap_tensorflow.NewCheckpointReader(In_ckpt_path)var_to_shape_map = reader.get_variable_to_shape_map()featureDict = dict()for key in var_to_shape_map:    featureDict[key] = reader.get_tensor(key)print(featureDict)
原创粉丝点击