You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

example_init.py 480 B

12345678910111213141516171819
  1. import os
  2. import joblib
  3. import numpy as np
  4. from learnware.model import BaseModel
  5. class SVM(BaseModel):
  6. def __init__(self):
  7. dir_path = os.path.dirname(os.path.abspath(__file__))
  8. self.model = joblib.load(os.path.join(dir_path, "svm.pkl"))
  9. def fit(self, X: np.ndarray, y: np.ndarray):
  10. pass
  11. def predict(self, X: np.ndarray) -> np.ndarray:
  12. return self.model.predict(X)
  13. def finetune(self, X: np.ndarray, y: np.ndarray):
  14. pass

基于学件范式,全流程地支持学件上传、检测、组织、查搜、部署和复用等功能。同时,该仓库作为北冥坞系统的引擎,支撑北冥坞系统的核心功能。