深度学习——稀疏自编码器(SAP)
发布时间
阅读量:
阅读量
- 模型简介
(1) 该模型应具备学习恒等变换的能力
(2) 隐藏层中神经元的激活状态需符合稀疏性要求(模型的核心部分)
(3) 隐藏层的权重矩阵也需满足稀疏性条件(这属于一种正则化手段,实际上,这种设计思路在稀疏编码中取得了良好效果,具有一定的启发意义)
- 模型实现
# Sparse Auto-Encoder
#
# Author: HSW
# Date: 2018-05-07
#
import tensorflow as tf
import numpy as np
def axvier_init(fan_in, fan_out, constant = 1):
''' Initial weights '''
low = -constant + np.sqrt(6.0 / (fan_in + fan_out))
high = constant + np.sqrt(6.0 / (fan_in + fan_out))
return tf.random_uniform((fan_in, fan_out), minval = low, maxval = high, dtype = tf.float32)
全部评论 (0)
还没有任何评论哟~
