class_docstr: Approximate Nearest Neighbor Search with Faiss (https://github.com/facebookresearch/faiss).
  Faiss provides both CPU and GPU implementation. More on the algorithms:
  https://github.com/facebookresearch/faiss/wiki
  
  Parameters
  ----------------
  model: object: :obj:`cornac.models.Recommender`, required
      Trained recommender model which to get user/item vectors from.
  
  nlist: int, default: 100
      The number of cells used for building the index.
  
  nprobe: int, default: 50
      The number of cells (out of nlist) that are visited to perform a search.
  
  use_gpu : bool, optional
      Whether or not to run Faiss on GPU. Requires faiss-gpu to be installed
      instead of faiss-cpu.
  
  num_threads: int, optional, default: -1
      Default number of threads used for building index. If num_threads = -1,
      all cores will be used.
  
  seed: int, optional, default: None
      Random seed for reproducibility.
  
  name: str, required
      Name of the recommender model.
  
  verbose: boolean, optional, default: False
      When True, running logs are displayed.
class_docstr_tok: ["Approximate","Nearest","Neighbor","Search","with","Faiss","(","https",":","\/\/github.com\/facebookresearch\/faiss",")",".","Faiss","provides","both","CPU","and","GPU","implementation",".","More","on","the","algorithms",":","https",":","\/\/github.com\/facebookresearch\/faiss\/wiki","Parameters","--","--","--","--","--","--","--","--","model",":","object",":",":","obj",":","`","cornac.models.Recommender","`",",","required","Trained","recommender","model","which","to","get","user\/item","vectors","from",".","nlist",":","int",",","default",":","100","The","number","of","cells","used","for","building","the","index",".","nprobe",":","int",",","default",":","50","The","number","of","cells","(","out","of","nlist",")","that","are","visited","to","perform","a","search",".","use_gpu",":","bool",",","optional","Whether","or","not","to","run","Faiss","on","GPU",".","Requires","faiss-gpu","to","be","installed","instead","of","faiss-cpu",".","num_threads",":","int",",","optional",",","default",":","-1","Default","number","of","threads","used","for","building","index",".","If","num_threads","=","-1",",","all","cores","will","be","used",".","seed",":","int",",","optional",",","default",":","None","Random","seed","for","reproducibility",".","name",":","str",",","required","Name","of","the","recommender","model",".","verbose",":","boolean",",","optional",",","default",":","False","When","True",",","running","logs","are","displayed","."]
code: def load(model_path, trainable=False):
      import faiss
  
      ann = BaseANN.load(model_path, trainable)
      idx_path = ann.load_from + ".index"
      ann.index = faiss.read_index(idx_path)
      if ann.use_gpu:
          ann.index = faiss.index_cpu_to_all_gpus(ann.index)
      return ann
  
file_path: cornac/cornac/models/ann/recom_ann_faiss.py
imports: import multiprocessing
  import numpy
  from ..recommender import MEASURE_L2, MEASURE_DOT, MEASURE_COSINE
  from .recom_ann_base import BaseANN
label_desc: Use image node_id 5 for calling the FaissANN obj's underlying member method code with example usage: obj.load(model_path, trainable) and returns: ann