Skip to content

Commit

Permalink
Merge pull request #2875 from entrylabs/issue/8906
Browse files Browse the repository at this point in the history
issue/8906
  • Loading branch information
leunge authored Nov 26, 2024
2 parents 91a40b1 + 879b92c commit 37dd6bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/class/AILearning.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ export default class AILearning {
this.loadModel({ url, trainParam, tableData, isActive, classes });
}

async reload() {
await this.#module?.reload?.();
async reload(url) {
await this.#module?.reload?.(url);
}

openInputPopup() {
Expand Down
4 changes: 2 additions & 2 deletions src/class/learning/ImageLearning.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ class ImageLearning {
this.isLoaded = true;
}

async reload() {
this.model = await tf.loadLayersModel(this.#url);
async reload(url) {
this.model = await tf.loadLayersModel(url || this.#url);
this.isLoaded = true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/class/learning/LogisticRegression.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class LogisticRegression extends LearningBase {
model.dispose();
}

async reload() {
this.model = await tf.loadLayersModel(this.url);
async reload(url) {
this.model = await tf.loadLayersModel(url || this.url);
this.isLoaded = true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/class/learning/SpeechClassification.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class Classification {
this.model = await tf.loadLayersModel(url);
}

async reload() {
this.model = await tf.loadLayersModel(this.#url);
async reload(url) {
this.model = await tf.loadLayersModel(url || this.#url);
this.isLoaded = true;
}
}
Expand Down

0 comments on commit 37dd6bb

Please sign in to comment.