(units, kernel_size=(3, 3))
return tl.GeneralGRUCell(
      candidate_transform=BuildConv,
      memory_transform_fn=DiagonalGate,
      gate_nonlinearity=tl.HardSigmoid,
      candidate_nonlinearity=tl.HardTanh)
Build convolutional GRU with diagonal gating as in ImprovedNGPU.
Build convolutional GRU with diagonal gating as in ImprovedNGPU.
Build convolutional GRU with diagonal gating as in ImprovedNGPU .
def ConvDiagonalGRU(units, kernel_size=(3, 3)):
  """Build convolutional GRU with diagonal gating as in ImprovedNGPU."""

  def BuildConv():
    return tl.Conv(filters=units, kernel_size=kernel_size, padding='SAME')

  return tl.GeneralGRUCell(
      candidate_transform=BuildConv,
      memory_transform_fn=DiagonalGate,
      gate_nonlinearity=tl.HardSigmoid,
      candidate_nonlinearity=tl.HardTanh)
def ConvDiagonalGRU ( units , kernel_size = ( 3 , 3 ) ) : def BuildConv ( ) : return tl . Conv ( filters = units , kernel_size = kernel_size , padding = 'SAME' ) return tl . GeneralGRUCell ( candidate_transform = BuildConv , memory_transform_fn = DiagonalGate , gate_nonlinearity = tl . HardSigmoid , candidate_nonlinearity = tl . HardTanh )