Constants

The following constants are available globally.

  • The file extension used to identify a TensorIO bundle, currently ‘.tfbundle’.

    Declaration

    Objective-C

    extern NSString *const _Nonnull kTFModelBundleExtension

    Swift

    let kTFModelBundleExtension: String
  • The name of the file inside a TensorIO bundle that contains the model spec, currently ‘model.json’.

    Declaration

    Objective-C

    extern NSString *const _Nonnull kTFModelInfoFile

    Swift

    let kTFModelInfoFile: String
  • The default classname for use with TensorFlow Lite models, currently TIOTFLiteModel.

    Declaration

    Objective-C

    extern NSString *const _Nonnull kTFLiteModelClassName

    Swift

    let kTFLiteModelClassName: String
  • The name of the directory inside a TensorIO bundle that contains additional data, currently ‘assets’.

    Declaration

    Objective-C

    extern NSString *const _Nonnull kTFModelAssetsDirectory

    Swift

    let kTFModelAssetsDirectory: String
  • No pixel format, used to represent an error reading the pixel format from the model.json file.

    Declaration

    Objective-C

    extern const OSType TIOPixelFormatTypeInvalid

    Swift

    let TIOPixelFormatTypeInvalid: OSType
  • Set the TIOModel load error to kTIOTFLiteModelLoadModelError when the underlying model (e.g. tflite model) cannot be loaded.

    Declaration

    Objective-C

    extern NSError *const _Nonnull kTIOTFLiteModelLoadModelError

    Swift

    let kTIOTFLiteModelLoadModelError: NSError
  • Set the TIOModel load error to kTIOTFLiteModelConstructInterpreterError when the tflite interpreter cannot be constructed.

    Declaration

    Objective-C

    extern NSError *const _Nonnull kTIOTFLiteModelConstructInterpreterError

    Swift

    let kTIOTFLiteModelConstructInterpreterError: NSError
  • Set the TIOModel load error to kTIOTFLiteModelAllocateTensorsError when the tflite tensors cannot be created.

    Declaration

    Objective-C

    extern NSError *const _Nonnull kTIOTFLiteModelAllocateTensorsError

    Swift

    let kTIOTFLiteModelAllocateTensorsError: NSError