learning_model 1.0.47 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -140,7 +140,7 @@ class LearningMobilenet {
|
|
|
140
140
|
if (this.mobilenetModule !== null) {
|
|
141
141
|
const cap = (0, tf_1.isTensor)(data) ? data : (0, tf_1.capture)(data, false);
|
|
142
142
|
const predict = this.mobilenetModule.predict(cap);
|
|
143
|
-
const activation = predict.
|
|
143
|
+
const activation = yield predict.data();
|
|
144
144
|
const classIndex = this.registerClassNumber(label);
|
|
145
145
|
if (!this.imageExamples[classIndex]) {
|
|
146
146
|
this.imageExamples[classIndex] = [];
|
|
@@ -152,7 +152,7 @@ class LearningMobilenet implements LearningInterface {
|
|
|
152
152
|
if (this.mobilenetModule !== null) {
|
|
153
153
|
const cap = isTensor(data) ? data : capture(data, false);
|
|
154
154
|
const predict = this.mobilenetModule.predict(cap) as tf.Tensor;
|
|
155
|
-
const activation = predict.
|
|
155
|
+
const activation = await predict.data() as Float32Array;
|
|
156
156
|
const classIndex = this.registerClassNumber(label);
|
|
157
157
|
if (!this.imageExamples[classIndex]) {
|
|
158
158
|
this.imageExamples[classIndex] = [];
|