DL4J中文文档/Keras模型导入/包装层

2019-01-18  本文已影响0人  hello风一样的男子

KerasBidirectional

[源码]

从Keras双向层包装器构建DL4J双向层

KerasBidirectional

public KerasBidirectional(Integer kerasVersion) throws UnsupportedKerasConfigurationException 

image.gif

从KerasLayer传递构造函数

getUnderlyingRecurrentLayer

public Layer getUnderlyingRecurrentLayer() 

image.gif

获取底层循环层

public KerasBidirectional(Map<String, Object> layerConfig)
            throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
image.gif

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

getBidirectionalLayer

public Bidirectional getBidirectionalLayer() 

image.gif

获取 DL4J 的双向层。

getOutputType

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

image.gif

获取层输出类型

getNumParams

public int getNumParams() 

image.gif

返回层中可训练的参数

getInputPreprocessor

public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException 

image.gif

为给定的输入类型获取适合的DL4J输入预处理器

setWeights

public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException 

image.gif

设置层的权重

上一篇 下一篇

猜你喜欢

热点阅读