DL4J中文文档/Keras模型导入/导入
Keras模型导入APIKerasModelImport[源码]从两个存档中的一个读取存储的Keras配置和权重:单个HDF5文件存储模型及JSON配置和权值的训练文本文件用于存储模型JSON配置,HDF5文件用于存储权重。importKerasModelAndWeightspublic static ComputationGraph importKerasModelA...
Keras模型导入API
KerasModelImport
从两个存档中的一个读取存储的Keras配置和权重:
- 单个HDF5文件存储模型及JSON配置和权值的训练
- 文本文件用于存储模型JSON配置,HDF5文件用于存储权重。
importKerasModelAndWeights
public static ComputationGraph importKerasModelAndWeights(
InputStream modelHdf5Stream,
boolean enforceTrainingConfig)
加载用model.save_model(…)保存的Keras (函数 API)模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras模型的输入流
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 ComputationGraph
- 查看 ComputationGraph
importKerasModelAndWeights
public static ComputationGraph importKerasModelAndWeights(InputStream modelHdf5Stream)
加载用model.save_model(…)保存的Keras (函数 API)模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras模型的输入流
- 返回 ComputationGraph
- 查看 ComputationGraph
importKerasSequentialModelAndWeights
public static MultiLayerNetwork importKerasSequentialModelAndWeights(InputStream modelHdf5Stream,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载用model.save_model(…)保存的Keras序列模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras序列模型的输入流
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 MultiLayerNetwork
- 查看 MultiLayerNetwork
importKerasSequentialModelAndWeights
public static MultiLayerNetwork importKerasSequentialModelAndWeights(InputStream modelHdf5Stream)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载用model.save_model(…)保存的Keras序列模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras序列模型的输入流
- 返回 MultiLayerNetwork
- 查看 MultiLayerNetwork
importKerasModelAndWeights
public static ComputationGraph importKerasModelAndWeights(String modelHdf5Filename, int[] inputShape,
boolean enforceTrainingConfig)
throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException
加载用model.save_model(…)保存的Keras (函数 API)模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras模型的输入流
- 参数 inputShape 模型的可选输入形状,没有这样的(例如notop=false 的模型)
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 ComputationGraph
- 抛出 IOException IO 异常
- 抛出 InvalidKerasConfigurationException 无效的 Keras 配置
- 抛出 UnsupportedKerasConfigurationException 不支持的 Keras 配置
- 查看 ComputationGraph
importKerasModelAndWeights
public static ComputationGraph importKerasModelAndWeights(String modelHdf5Filename, boolean enforceTrainingConfig)
throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException
加载用model.save_model(…)保存的Keras (函数 API)模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras模型的输入流
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 ComputationGraph
- 抛出 IOException IO 异常
- 抛出 InvalidKerasConfigurationException 无效的 Keras 配置
- 抛出 UnsupportedKerasConfigurationException 不支持的 Keras 配置
- 查看 ComputationGraph
importKerasModelAndWeights
public static ComputationGraph importKerasModelAndWeights(String modelHdf5Filename)
throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException
- 参数 modelHdf5Stream 包含HDF5存档的Keras模型的输入流
- 返回 ComputationGraph
- 抛出 IOException IO 异常
- 抛出 InvalidKerasConfigurationException 无效的 Keras 配置
- 抛出 UnsupportedKerasConfigurationException 不支持的 Keras 配置
- 查看 ComputationGraph
importKerasSequentialModelAndWeights
public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelHdf5Filename,
int[] inputShape,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载用model.save_model(…)保存的Keras 序列模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras序列模型的输入流
- 参数 inputShape 模型的可选输入形状,没有这样的(例如notop=false 的模型)
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 MultiLayerNetwork
- 抛出 IOException IO 异常
- 查看 MultiLayerNetwork
importKerasSequentialModelAndWeights
public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelHdf5Filename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载用model.save_model(…)保存的Keras 序列模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras序列模型的输入流
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 MultiLayerNetwork
- 抛出 IOException IO 异常
- 查看 MultiLayerNetwork
importKerasSequentialModelAndWeights
public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelHdf5Filename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载用model.save_model(…)保存的Keras 序列模型
- 参数 modelHdf5Stream 包含HDF5存档的Keras序列模型的输入流
- 返回 MultiLayerNetwork
- 抛出 IOException IO 异常
- 查看 MultiLayerNetwork
importKerasModelAndWeights
public static ComputationGraph importKerasModelAndWeights(String modelJsonFilename, String weightsHdf5Filename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras(函数 API)模型
- 参数 modelJsonFilename 存储Keras模型配置的JSON文件路径
- 参数 weightsHdf5Filename 存储Kelas模型权重的HDF5存档路径
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 ComputationGraph
- 抛出 IOException IO 异常
- 查看 ComputationGraph
importKerasModelAndWeights
public static ComputationGraph importKerasModelAndWeights(String modelJsonFilename, String weightsHdf5Filename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras(函数 API)模型
- 参数 modelJsonFilename 存储Keras模型配置的JSON文件路径
- 参数 weightsHdf5Filename 存储Kelas模型权重的HDF5存档路径
- 返回 ComputationGraph
- 抛出 IOException IO 异常
- 查看 ComputationGraph
importKerasSequentialModelAndWeights
public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras序列模型
- 参数 modelJsonFilename 存储Keras序列模型配置的JSON文件路径
- 参数 weightsHdf5Filename 存储Kelas序列模型权重的HDF5存档路径
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 MultiLayerNetwork
- 抛出 IOException IO 异常
- 查看 MultiLayerNetwork
importKerasSequentialModelAndWeights
public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras序列模型
- 参数 modelJsonFilename 存储Keras序列模型配置的JSON文件路径
- 参数 weightsHdf5Filename 存储Kelas序列模型权重的HDF5存档路径
- 返回 MultiLayerNetwork
- 抛出 IOException IO 异常
- 查看 MultiLayerNetwork
importKerasModelConfiguration
public static ComputationGraphConfiguration importKerasModelConfiguration(String modelJsonFilename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras(函数 API)模型
- 参数 modelJsonFilename 存储Keras模型配置的JSON文件路径
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 ComputationGraphConfiguration
- 抛出 IOException IO 异常
- 查看 ComputationGraphConfiguration
importKerasModelConfiguration
public static ComputationGraphConfiguration importKerasModelConfiguration(String modelJsonFilename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras(函数 API)模型
- 参数 modelJsonFilename 存储Keras模型配置的JSON文件路径
- 返回 ComputationGraphConfiguration
- 抛出 IOException IO 异常
- 查看 ComputationGraphConfiguration
importKerasSequentialConfiguration
public static MultiLayerConfiguration importKerasSequentialConfiguration(String modelJsonFilename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras序列模型
- 参数 modelJsonFilename 存储Keras序列模型配置的JSON文件路径
- 参数 enforceTrainingConfig 是否实施训练配置选项
- 返回 MultiLayerConfiguration
- 抛出 IOException IO 异常
- 查看 MultiLayerConfiguration
importKerasSequentialConfiguration
public static MultiLayerConfiguration importKerasSequentialConfiguration(String modelJsonFilename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
加载分别用model.to_json() 和 model.save_weights(…)保存配置和权重的Keras序列模型
- 参数 modelJsonFilename 存储Keras序列模型配置的JSON文件路径
- 返回 MultiLayerConfiguration
- 抛出 IOException IO 异常
- 查看 MultiLayerConfiguration
更多推荐
所有评论(0)