Browse Source

[FIX] fix pickle model bugs

tags/v0.3.2
bxdd 2 years ago
parent
commit
d672f88809
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      learnware/tests/templates/pickle_model.py

+ 2
- 2
learnware/tests/templates/pickle_model.py View File

@@ -16,8 +16,8 @@ class PickleLoadedModel(BaseModel):
):
super(PickleLoadedModel, self).__init__(input_shape=input_shape, output_shape=output_shape)
dir_path = os.path.dirname(os.path.abspath(__file__))
self.pickle_filepath = os.path.join(pickle_filepath, dir_path)
with open(pickle_filepath, "rb") as fd:
self.pickle_filepath = os.path.join(pickle_filename, dir_path)
with open(pickle_filename, "rb") as fd:
self.model = pickle.load(fd)
self.predict_method = predict_method
self.fit_method = fit_method


Loading…
Cancel
Save