code: def _build_fasttext(
      num_classes,
      maxlen,
      max_features,
      features,
      loss_func="categorical_crossentropy",
      activation="softmax",
      metrics=["accuracy"],
      verbose=1,
  ):
      model = keras.models.Sequential()
      model.add(
          keras.layers.Embedding(max_features, 64, input_length=maxlen)
      )
      model.add(keras.layers.SpatialDropout1D(0.25))
      model.add(keras.layers.GlobalMaxPool1D())
      model.add(keras.layers.BatchNormalization())
      model.add(
          keras.layers.Dense(
              64, activation="relu", kernel_initializer="he_normal"
          )
      )
      model.add(keras.layers.Dropout(0.5))
      model.add(keras.layers.Dense(num_classes, activation=activation))
      model.compile(
          loss=loss_func, optimizer=U.DEFAULT_OPT, metrics=metrics
      )
  
      return model
  
file_path: ktrain/ktrain/text/models.py
imports: from ..None import utils
  from ..imports import *
  from .None import preprocessor
label_desc: Use image node_id 10 for calling a global function with example usage: _build_fasttext(num_classes, maxlen, max_features, features, loss_func, activation, metrics, verbose) and returns: model