GET
/
api
/
{projectId}
/
training
/
keras
/
{learnId}
Keras information
curl --request GET \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/training/keras/{learnId} \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "error": "<string>",
  "dependencies": {
    "classes": [
      "<string>"
    ],
    "blockNames": [
      "<string>"
    ],
    "featureCount": 123,
    "sampleCount": 123
  },
  "trained": true,
  "name": "<string>",
  "type": "anomaly",
  "script": "<string>",
  "minimumConfidenceRating": 123,
  "selectedModelType": "int8",
  "mode": "visual",
  "visualLayers": [
    {
      "type": "dense",
      "neurons": 123,
      "kernelSize": 123,
      "dropoutRate": 123,
      "columns": 123,
      "stack": 123,
      "enabled": true,
      "organizationModelId": 123
    }
  ],
  "trainingCycles": 123,
  "learningRate": 123,
  "batchSize": 123,
  "defaultBatchSize": 123,
  "shape": "<string>",
  "trainTestSplit": 123,
  "autoClassWeights": true,
  "useLearnedOptimizer": true,
  "augmentationPolicyImage": "none",
  "augmentationPolicySpectrogram": {
    "enabled": true,
    "warping": true,
    "freqMasking": "none",
    "timeMasking": "none",
    "gaussianNoise": "none"
  },
  "transferLearningModels": [
    {
      "name": "<string>",
      "shortName": "<string>",
      "abbreviatedName": "<string>",
      "description": "<string>",
      "hasNeurons": true,
      "hasDropout": true,
      "defaultNeurons": 123,
      "defaultDropout": 123,
      "defaultLearningRate": 123,
      "defaultTrainingCycles": 123,
      "hasImageAugmentation": true,
      "type": "dense",
      "learnBlockType": "anomaly",
      "organizationModelId": 123,
      "implementationVersion": 123,
      "repositoryUrl": "<string>",
      "author": "<string>",
      "blockType": "official",
      "customParameters": [
        {
          "name": "Scale axes",
          "value": "<string>",
          "defaultValue": "<string>",
          "type": "text",
          "help": "Divide axes by this number",
          "param": "scale-axes",
          "selectOptions": [
            {
              "value": "<string>",
              "selected": true,
              "optionLabel": "<string>",
              "priority": 123,
              "romEstimate": 123,
              "needsOps": [
                "<string>"
              ],
              "needsFeatures": [
                "<string>"
              ]
            }
          ],
          "readonly": true,
          "shouldShow": true,
          "showIf": {
            "parameter": "<string>",
            "operator": "eq",
            "value": "<string>"
          },
          "invalidText": "<string>",
          "section": "advanced",
          "multiline": true,
          "required": true,
          "hint": "<string>",
          "placeholder": "<string>",
          "showClickToSet": true,
          "valid": [
            {}
          ],
          "items": {},
          "properties": {}
        }
      ],
      "displayCategory": "classical",
      "blockNoLongerAvailable": {
        "reasonMarkdown": "<string>",
        "reasonHtml": "<string>"
      }
    }
  ],
  "profileInt8": true,
  "skipEmbeddingsAndMemory": true,
  "akidaEdgeLearningConfig": {
    "enabled": true,
    "additionalClasses": 123,
    "neuronsPerClass": 123
  },
  "customValidationMetadataKey": "<string>",
  "showAdvancedTrainingSettings": true,
  "showAugmentationTrainingSettings": true,
  "customParameters": {},
  "anomalyCapacity": "low",
  "lastShownModelVariant": "int8",
  "blockParameters": {
    "backbone": "<string>",
    "numLayers": 123,
    "poolSize": 123,
    "samplingRatio": 123,
    "numNearestNeighbors": 123
  },
  "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.",
      "suggestedValue": 123,
      "suggestedValueText": "<string>",
      "value": 0.5
    }
  ]
}

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
integer
required

Project ID

learnId
integer
required

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

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

dependencies
object
required
trained
boolean
required

Whether the block is trained

name
string
required
script
string
required

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

minimumConfidenceRating
number
required

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

selectedModelType
enum<string>
required

The model type that is currently selected.

Available options:
int8,
float32,
akida,
requiresRetrain
mode
enum<string>
required

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

Available options:
visual,
expert
visualLayers
object[]
required

The visual layers (if in visual mode) for the neural network. This will be an empty array when in expert mode.

trainingCycles
integer
required

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

learningRate
number
required

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

defaultBatchSize
integer
required

The default batch size if a value is not configured.

shape
string
required

Python-formatted tuple of input axes

augmentationPolicyImage
enum<string>
required

The data augmentation policy to use with image input

Available options:
none,
all
transferLearningModels
object[]
required
profileInt8
boolean
required

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

skipEmbeddingsAndMemory
boolean
required

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

showAdvancedTrainingSettings
boolean
required

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

showAugmentationTrainingSettings
boolean
required

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

thresholds
object[]
required

List of configurable thresholds for this block.

error
string

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

type
enum<string>

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

Available options:
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
batchSize
integer

The batch size used during training.

trainTestSplit
number

Train/test split (between 0 and 1)

autoClassWeights
boolean

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

useLearnedOptimizer
boolean

Use learned optimizer and ignore learning rate.

augmentationPolicySpectrogram
object
akidaEdgeLearningConfig
object
customValidationMetadataKey
string

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

customParameters
object

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

anomalyCapacity
enum<string>

Capacity level for visual anomaly detection (GMM). 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

Available options:
low,
medium,
high
lastShownModelVariant
enum<string>

Last shown variant on the Keras screen. Used to keep the same view after refreshing.

Available options:
int8,
float32,
akida
blockParameters
object

Training parameters specific to the type of the learn block. Parameters may be adjusted depending on the model defined in the visual layers. Used for our built-in blocks.