Learn

Keras information

Get information about a Keras block, such as its dependencies. Use the impulse blocks to find the learnId.

get/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

Response

OK

successboolean required

Whether the operation succeeded

errorstring

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

trainedboolean required

Whether the block is trained

namestring required
type'anomaly' | 'anomaly-gmm' | 'keras' | 'keras-transfer-image' | 'keras-transfer-kws' | 'keras-object-detection' | 'keras-regression' | 'keras-akida' | 'keras-akida-transfer-image' | 'keras-akida-object-detection' | 'keras-visual-anomaly' | 'keras-freeform' | 'keras-self-contained-freeform' | 'keras-anomaly' | 'vlm'

The type of learning block (anomaly, keras, keras-transfer-image, ...). Each behaves differently.

scriptstring required

The Keras script. This script might be empty if the mode is visual.

minimumConfidenceRatingnumber required

DEPRECATED, see "thresholds" instead. Minimum confidence rating required for the neural network. Scores below this confidence are tagged as uncertain.

selectedModelType'int8' | 'float32' | 'akida' | 'requiresRetrain' required
mode'visual' | 'expert' required

The mode (visual or expert) to use for editing this network.

trainingCyclesinteger required

Number of training cycles. If in expert mode this will be 0.

learningRatenumber required

Learning rate (between 0 and 1). If in expert mode this will be 0.

batchSizeinteger

The batch size used during training.

defaultBatchSizeinteger required

The default batch size if a value is not configured.

shapestring required

Python-formatted tuple of input axes

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' required

The data augmentation policy to use with image input

profileInt8boolean required

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

skipEmbeddingsAndMemoryboolean required

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

customValidationMetadataKeystring

This metadata key is used to prevent group data leakage between train and validation datasets.

showAdvancedTrainingSettingsboolean required

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

showAugmentationTrainingSettingsboolean required

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'
isMultiHeadboolean

Whether this model is configured for multi-head outputs.

Example response

{
  "transferLearningModels": [
    {
      "customParameters": [
        {
          "name": "Scale axes",
          "type": "text",
          "help": "Divide axes by this number",
          "param": "scale-axes"
        }
      ]
    }
  ],
  "thresholds": [
    {
      "key": "min_score",
      "description": "Score threshold",
      "helpText": "Threshold score for bounding boxes. If the score for a bounding box is below this the box will be discarded."
    }
  ]
}

Changes

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