BERT Classification Learner

Trains a text classification model on top of the provided BERT model. The model is extended with 3 layers:
  • GlobalAveragePooling1D layer
  • Dropout layer
  • Dense layer

Besides the typical classification task where every row is assigned a single class it is also possible to train a model for multi-label classification where a row can be assigned multiple labels.

If a validation table is provided, then the model performance is evaluated on that data after every epoch.



Sentence column
A column with plain text (String) or Documents, that contains text to be classified. No special pre-processing is needed.
Class column
A column that contains class labels.
Max sequence length
The maximum length of a sequence after tokenization. The upper limit is 512.
Multi-label classification
Enables multi-label classification mode. In this mode multiple labels (classes) can be assigned to each text.
Class separator
The character used to separate different classes assigned to a given text in multi-label classification mode.


Number of epochs
The number of epochs used for training the classifier.
Batch size
The size of a chunk of the input data used for model update.
Validation batch size
The size of a chunk of the validation data to process.
Fine tune BERT
If checked then the weights of the BERT model will be trained along with the additional classifier. Fine-tuning BERT will be more resource and time intensive, but the results are usually better.
Available optimizers and their configuration.


Select one of the Python execution environment options:
  • use default Python environment for the Redfield BERT Nodes (can be configured on the preference page)
  • use Conda environment from a Conda flow variable (only selectable if such a flow variable is available)

Input Ports

BERT Model
Data Table
Optional Validation Table

Output Ports

BERT Classifier model
Statistics of the training process


This node has no views




You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.