DL4J中文文档/Keras模型导入/本地层

KerasLocallyConnected1D

[源码]

从Keras导入一维本地连接层。

KerasLocallyConnected1D

public KerasLocallyConnected1D(Integer kerasVersion) throws UnsupportedKerasConfigurationException 

image.gif

从KerasLayer传递构造函数

  • 参数 kerasVersion Keras主版本
  • 抛出 UnsupportedKerasConfigurationException 不支持的 Keras 配置

getLocallyConnected1DLayer

public LocallyConnected1D getLocallyConnected1DLayer() 

image.gif

获取一维本地连接层

   public KerasLocallyConnected1D(Map layerConfig)
            throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException 
image.gif

来自解析的keras层配置字典的构造函数。

  • 参数 layerConfig 包含keras层配置的字典
  • 抛出 InvalidKerasConfigurationException 无效的 Keras 配置
  • 抛出 UnsupportedKerasConfigurationException 不支持的无效的 Keras 配置

getOutputType

public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException 

image.gif

获取层输出类型

  • 参数 inputType 输入类型数组
  • 返回 按输入类型返回输出类型
  • 抛出 InvalidKerasConfigurationException 无效的 Keras 配置

setWeights

public void setWeights(Map weights) throws InvalidKerasConfigurationException 

image.gif

为一维本地连接层设置权重

  • 参数 weights 从参数名映射到INDArray。

KerasLocallyConnected2D

[源码]

从Keras导入二维本地连接层。

KerasLocallyConnected2D

public KerasLocallyConnected2D(Integer kerasVersion) throws UnsupportedKerasConfigurationException 

image.gif

从KerasLayer传递构造函数

  • 参数 kerasVersion Keras主版本
  • 抛出 UnsupportedKerasConfigurationException 不支持的 Keras 配置

getLocallyConnected2DLayer

public LocallyConnected2D getLocallyConnected2DLayer() 

image.gif

获取二维本地连接层。

   public KerasLocallyConnected2D(Map layerConfig)
            throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException 
image.gif

来自解析的keras层配置字典的构造函数。

  • 参数 layerConfig 包含keras层配置的字典
  • 抛出 InvalidKerasConfigurationException 无效的 Keras 配置
  • 抛出 UnsupportedKerasConfigurationException 不支持的无效的 Keras 配置

getOutputType

public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException 

image.gif

获取层输出类型

  • 参数 inputType 输入类型数组
  • 返回 按输入类型返回输出类型
  • 抛出 InvalidKerasConfigurationException 无效的 Keras 配置

setWeights

public void setWeights(Map weights) throws InvalidKerasConfigurationException 

image.gif

为二维本地连接层设置权重

  • 参数 weights 从参数名映射到INDArray。

你可能感兴趣的:(DL4J中文文档/Keras模型导入/本地层)