Learn

Keras settings

Configure the Keras block, such as its minimum confidence score. Use the impulse blocks to find the learnId.

post/api/{projectId}/training/keras/{learnId}

Request

Path parameters

projectIdinteger required

Project ID

learnIdinteger required

Learn Block ID, use the impulse functions to retrieve the ID

Request body

mode'expert' | 'visual'

Whether to use visual or expert mode.

minimumConfidenceRatingnumber

DEPRECATED, use "setImpulseThresholds" instead. Minimum confidence score, if the neural network scores a sample below this threshold it will be flagged as uncertain.

selectedModelType'int8' | 'float32' | 'akida' | 'requiresRetrain'
scriptstring

Raw Keras script (only used in expert mode)

trainingCyclesinteger

Number of training cycles (only in visual mode).

learningRatenumber

Learning rate (between 0 and 1) (only in visual mode).

batchSizenumber

Batch size used during training (only in visual mode).

trainTestSplitnumber

Train/test split (between 0 and 1)

autoClassWeightsboolean

Whether to automatically balance class weights, use this for skewed datasets.

useLearnedOptimizerboolean

Use learned optimizer and ignore learning rate.

augmentationPolicyImage'none' | 'all'

The data augmentation policy to use with image input

profileInt8boolean

Whether to profile the i8 model (might take a very long time)

skipEmbeddingsAndMemoryboolean

If set, skips creating embeddings and measuring memory (used in tests)

customValidationMetadataKeystring

If the 'custom validation split' experiment is enabled, this metadata key is used to prevent group data leakage between train and validation datasets.

showAdvancedTrainingSettingsboolean

Whether the 'Advanced training settings' UI element should be expanded.

showAugmentationTrainingSettingsboolean

Whether the 'Augmentation training settings' UI element should be expanded.

customParametersobject

Training parameters, this list depends on the list of parameters that the model exposes.

anomalyCapacity'low' | 'medium' | 'high'

Capacity level for visual anomaly detection. Determines which set of default configurations to use. The higher capacity, the higher number of (Gaussian) components, and the more adapted the model becomes to the original distribution

lastShownModelVariant'int8' | 'float32' | 'akida'
trainingProcessor'cpu' | 'gpu'

Training processor selection for an impulse.

assertGpuUsagePercentagenumber nullable

EXPERIMENTAL. When set, max GPU utilization will be checked against this threshold after training. Used for testing purposes.

Response

OK

successboolean required

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

Changes

No recorded changes to this operation across all 1 revision of this API.