【问题标题】:Stacked Autoencoder堆叠式自动编码器
【发布时间】:2019-04-25 08:09:11
【问题描述】:

我有一个基本的自动编码器结构。我想将其更改为堆叠式自动编码器。据我所知,堆叠式 AE 在两个方面有所不同:

  1. 它由稀疏的香草 AE 层组成
  2. 它进行分层训练。

我想知道稀疏性是否是堆叠 AE 的必要条件,或者只是增加普通 AE 结构中的隐藏层数量会使其成为堆叠 AE?

class Autoencoder(Chain):
  def __init__(self):
    super().__init__()
    with self.init_scope():
  # encoder part
      self.l1 = L.Linear(1308608,500)
      self.l2 = L.Linear(500,100)
  # decoder part
      self.l3 = L.Linear(100,500)
      self.l4 = L.Linear(500,1308608)

  def forward(self,x):
      h = self.encode(x)
      x_recon = self.decode(h)
      return x_recon

  def __call__(self,x):
      x_recon = self.forward(x)
      loss = F.mean_squared_error(h, x)
      return loss

  def encode(self, x, train=True):
      h = F.dropout(self.activation(self.l1(x)), train=train)
      return self.activation(self.l2(x))

  def decode(self, h, train=True):
      h = self.activation(self.l3(h))
      return self.l4(x)

【问题讨论】:

    标签: image-processing autoencoder chainer


    【解决方案1】:

    在堆叠自动编码器的上下文中经常提到稀疏似乎是这种情况,但不一定。因此,我认为没有必要。

    【讨论】:

    • 所以stacked AE是一个普通的AE,有更多的隐藏层并且做逐层预训练..
    • 是的,我会这么说。
    猜你喜欢
    • 2017-04-16
    • 2021-12-19
    • 2018-08-24
    • 2023-04-07
    • 2017-09-18
    • 2018-09-16
    • 1970-01-01
    • 1970-01-01
    • 2019-11-08
    相关资源
    最近更新 更多