code: function addFaces(faces, className, numJitters = 0) {
        if (!faces || !faces.length) {
          throw new Error('train - expected an array containing atleast one face image')
        }
  
        if (!className) {
          throw new Error('train - expected a class name')
        }
  
        const promises = flatten(
          faces.map(
            f => getJitteredFaces(f, numJitters).map(
              () => getNet().computeFaceDescriptorAsync(f)
            )
          )
        )
  
        return Promise.all(promises)
          .then(descriptors => addFaceDescriptors(descriptors, className))
      }
docs: /* compute the face descriptors for all faces of the given class, which are used for prediction /* this function is used to "train" the recognizer and has to be performed for all persons faces, /* which you want to recognize before running prediction