learning_model 1.0.39 → 1.0.41
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.
|
@@ -190,13 +190,13 @@ class LearningMobilenet {
|
|
|
190
190
|
this.isRunning = false;
|
|
191
191
|
},
|
|
192
192
|
onBatchBegin: (batch, logs) => {
|
|
193
|
-
console.log(`Batch ${batch} is starting.`);
|
|
193
|
+
//console.log(`Batch ${batch} is starting.`);
|
|
194
194
|
},
|
|
195
195
|
onBatchEnd: (batch, logs) => {
|
|
196
|
-
console.log(`Batch ${batch} has ended.`);
|
|
196
|
+
//console.log(`Batch ${batch} has ended.`);
|
|
197
197
|
},
|
|
198
198
|
onEpochBegin: (epoch, logs) => {
|
|
199
|
-
console.log(`Epoch ${epoch
|
|
199
|
+
//console.log(`Epoch ${epoch+1} is starting.`, logs);
|
|
200
200
|
},
|
|
201
201
|
onEpochEnd: (epoch, logs) => {
|
|
202
202
|
this.onEpochEnd(epoch, logs);
|
|
@@ -264,6 +264,7 @@ class LearningMobilenet {
|
|
|
264
264
|
classProbabilities.set(className, probability);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
+
console.log('classProbabilities', classProbabilities);
|
|
267
268
|
(0, tfjs_1.dispose)(logits);
|
|
268
269
|
return classProbabilities;
|
|
269
270
|
}
|
|
@@ -300,7 +301,7 @@ class LearningMobilenet {
|
|
|
300
301
|
layers: [
|
|
301
302
|
tf.layers.dense({
|
|
302
303
|
inputShape: this.mobilenetModule.outputs[0].shape.slice(1),
|
|
303
|
-
units:
|
|
304
|
+
units: 128,
|
|
304
305
|
activation: 'relu',
|
|
305
306
|
kernelInitializer: varianceScaling,
|
|
306
307
|
useBias: true
|
|
@@ -199,13 +199,13 @@ class LearningMobilenet implements LearningInterface {
|
|
|
199
199
|
this.isRunning = false;
|
|
200
200
|
},
|
|
201
201
|
onBatchBegin: (batch: any, logs: any) => {
|
|
202
|
-
console.log(`Batch ${batch} is starting.`);
|
|
202
|
+
//console.log(`Batch ${batch} is starting.`);
|
|
203
203
|
},
|
|
204
204
|
onBatchEnd: (batch: any, logs: any) => {
|
|
205
|
-
console.log(`Batch ${batch} has ended.`);
|
|
205
|
+
//console.log(`Batch ${batch} has ended.`);
|
|
206
206
|
},
|
|
207
207
|
onEpochBegin: (epoch: number, logs: any) => {
|
|
208
|
-
console.log(`Epoch ${epoch+1} is starting.`, logs);
|
|
208
|
+
//console.log(`Epoch ${epoch+1} is starting.`, logs);
|
|
209
209
|
},
|
|
210
210
|
onEpochEnd: (epoch: number, logs: any) => {
|
|
211
211
|
this.onEpochEnd(epoch, logs);
|
|
@@ -273,6 +273,7 @@ class LearningMobilenet implements LearningInterface {
|
|
|
273
273
|
classProbabilities.set(className, probability);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
+
console.log('classProbabilities', classProbabilities);
|
|
276
277
|
dispose(logits);
|
|
277
278
|
return classProbabilities;
|
|
278
279
|
} catch (error) {
|
|
@@ -310,7 +311,7 @@ class LearningMobilenet implements LearningInterface {
|
|
|
310
311
|
layers: [
|
|
311
312
|
tf.layers.dense({
|
|
312
313
|
inputShape: this.mobilenetModule!.outputs[0].shape.slice(1),
|
|
313
|
-
units:
|
|
314
|
+
units: 128,
|
|
314
315
|
activation: 'relu',
|
|
315
316
|
kernelInitializer: varianceScaling, // 'varianceScaling'
|
|
316
317
|
useBias: true
|