美文网首页
DL4J中文文档/Keras模型导入/归一化层

DL4J中文文档/Keras模型导入/归一化层

作者: hello风一样的男子 | 来源:发表于2019-01-17 16:03 被阅读0次

    KerasBatchNormalization(Keras批量归一化层)

    [源码]

    从Keras导入一个BatchNormalization层。

    KerasBatchNormalization

    public KerasBatchNormalization(Integer kerasVersion) throws UnsupportedKerasConfigurationException 
    
    
    image.gif

    从KerasLayer传递构造函数

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

    getBatchNormalizationLayer

    public BatchNormalization getBatchNormalizationLayer() 
    
    
    image.gif

    获取BatchNormalization层

    public KerasBatchNormalization(Map<String, Object> 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 配置

    getNumParams

    public int getNumParams() 
    
    
    image.gif

    返回层中可训练参数的数目。

    setWeights

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

    设置层的权重

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

    相关文章

      网友评论

          本文标题:DL4J中文文档/Keras模型导入/归一化层

          本文链接:https://www.haomeiwen.com/subject/iyvidqtx.html