code: def create_model(text_in,
                   labels,
                   timesteps,
                   per_example_weights,
                   phase=pt.Phase.train):
    
    with pt.defaults_scope(phase=phase, l2loss=0.00001):
      # The embedding lookup must be placed on a cpu.
      with tf.device('/cpu:0'):
        embedded = text_in.embedding_lookup(CHARS, [EMBEDDING_SIZE])
      # We need to cleave the sequence because sequence lstm expect each
      # timestep to be in its own Tensor.
      lstm = (embedded.cleave_sequence(timesteps).sequence_lstm(CHARS))
  
      # The classifier is much more efficient if it runs across the entire
      # batch at once, so we want to squash (i.e. uncleave).
      #
      # Hidden nodes is set to 32 because it seems to work well.
      return (lstm.squash_sequence().fully_connected(32,
                                                     activation_fn=tf.nn.relu)
              .dropout(0.7)
              .softmax_classifier(SEXES,
                                  labels,
                                  per_example_weights=per_example_weights))
docs: Creates a model for running baby names.