   /// As hidden variable we use the "true" pose of the patch
   public typealias Hidden = Pose2
   
-  /// Initialize to uninitialized components
+  /// Initialize with the manually labeled images
   public init(_ data:[Datum], using sourceOfEntropy: inout AnyRandomNumberGenerator) {
     // We do an initial training of the encode with the manually labeled images
     let paches = data.map { $0.frame.patch(at: $0.manualLabel) }

  /// Given a datum and a model, sample from the hidden variables
  public func sample(count:Int, for datum: Datum,
                     using sourceOfEntropy: inout AnyRandomNumberGenerator) -> [Hidden] {
    let labels = [Hidden]()
    //    let labels : [Hidden] = (0..<count).map { _ in
    //      let u = Double.random(in: 0..<p1+p2, using: &sourceOfEntropy)

  }
  
  /// Train from a collection of image patches
  /// - To Do: we have to be able to give extra parameters !
  public init(from imageBatch: Tensor<Double>) {
    let trainedEncoder = Encoder(from: imageBatch)
    let fgPatches = trainedEncoder.encode(imageBatch)
    let bgPatches = trainedEncoder.encode(imageBatch) // - To Do: should be different!
    self.init(encoder: trainedEncoder,
              foregroundModel : FG(from: fgPatches),
              backgroundModel : BG(from: bgPatches))
  }
}

/// Make it trainable with Monte Carlo EM
extension TrackingLikelihoodModel : McEmModel {
  /// As datum we have a (giant) image and a noisy manual label for an image patch
  public typealias Datum = (frame: Tensor<Double>, manualLabel:OrientedBoundingBox)
