layer_global_attention_pool: GlobalAttentionPool

Description Usage Arguments

View source: R/layers_pool.R

Description

\loadmathjax

A gated attention global pooling layer as presented by Li et al. (2017).

This layer computes: \mjdeqn\boldsymbolX' = \sum\limits_i=1^N (\sigma(\boldsymbolX \boldsymbolW _ 1 + \boldsymbolb _ 1) \odot (\boldsymbolX \boldsymbolW _ 2 + \boldsymbolb _ 2))_i where \mjeqn\sigma is the sigmoid activation function.

Mode: single, disjoint, mixed, batch.

Input

Output

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
layer_global_attention_pool(
  object,
  channels,
  kernel_initializer = "glorot_uniform",
  bias_initializer = "zeros",
  kernel_regularizer = NULL,
  bias_regularizer = NULL,
  kernel_constraint = NULL,
  bias_constraint = NULL,
  ...
)

Arguments

channels

integer, number of output channels

kernel_initializer

NA

bias_initializer

initializer for the bias vectors

kernel_regularizer

regularization applied to the kernel matrices

bias_regularizer

regularization applied to the bias vectors

kernel_constraint

constraint applied to the kernel matrices

bias_constraint

constraint applied to the bias vectors.


rdinnager/rspektral documentation built on June 12, 2021, 1:26 a.m.