class_docstr: A generic recurrent neural network encoder
  
  # Arguments
  rnns: rnn layers used for encoder, support stacked rnn layers
  embedding: embedding layer in encoder
  input_shape: shape of input, not including batch
  
  >>> encoder = RNNEncoder.initialize("lstm", 2, 3)
  creating: createZooKerasLSTM
  creating: createZooKerasLSTM
  creating: createZooKerasRNNEncoder
  
  >>> lstm = LSTM(3)
  creating: createZooKerasLSTM
  >>> embedding = Embedding(1000, 32, input_length=10, name="embedding1")
  creating: createZooKerasEmbedding
  >>> encoder = RNNEncoder([lstm], embedding)
  creating: createZooKerasRNNEncoder
docstr: rnn_type: currently support "simplernn | lstm | gru"
  nlayers: number of layers used in encoder
  hidden_size: hidden size of encoder
  embedding: embedding layer in encoder, `None` is supported
docstr_tok: ["rnn_type",":","currently","support","``","simplernn","|","lstm","|","gru","''","nlayers",":","number","of","layers","used","in","encoder","hidden_size",":","hidden","size","of","encoder","embedding",":","embedding","layer","in","encoder",",","`","None","`","is","supported"]
code: def initialize(
      cls,
      rnn_type,
      nlayers,
      hidden_size,
      embedding=None,
      input_shape=None,
  ):
      """
      rnn_type: currently support "simplernn | lstm | gru"
      nlayers: number of layers used in encoder
      hidden_size: hidden size of encoder
      embedding: embedding layer in encoder, `None` is supported
      """
      rnns = createRNN(rnn_type, nlayers, hidden_size)
      return RNNEncoder(rnns, embedding, input_shape)
  
imports: from bigdl.nn.layer import Layer
  from zoo.pipeline.api.keras.layers import *
  from zoo.models.common import ZooModel
  from zoo.common.utils import callZooFunc
  from zoo.pipeline.api.keras.engine import ZooKerasLayer
  from zoo.pipeline.api.keras.models import Model
label_desc: Use image node_id 2 for calling the RNNEncoder obj's underlying member method code with example usage: obj.initialize(cls, rnn_type, nlayers, hidden_size, embedding, input_shape) and returns: RNNEncoder