diff --git a/packages/plugins/model-define/tensorflow-mobilenet-model-define/package.json b/packages/plugins/model-define/tensorflow-mobilenet-model-define/package.json index c73a1dd36..1f5c8fbc9 100644 --- a/packages/plugins/model-define/tensorflow-mobilenet-model-define/package.json +++ b/packages/plugins/model-define/tensorflow-mobilenet-model-define/package.json @@ -1,6 +1,6 @@ { "name": "@pipcook/plugins-tensorflow-mobilenet-model-define", - "version": "1.0.0", + "version": "1.0.1", "description": "mobilenet model of tensorflow", "main": "dist/index", "types": "dist/index", diff --git a/packages/plugins/model-define/tensorflow-mobilenet-model-define/src/index.ts b/packages/plugins/model-define/tensorflow-mobilenet-model-define/src/index.ts index 9530a380f..7c388a601 100644 --- a/packages/plugins/model-define/tensorflow-mobilenet-model-define/src/index.ts +++ b/packages/plugins/model-define/tensorflow-mobilenet-model-define/src/index.ts @@ -116,7 +116,7 @@ const mobilenetDefine: ModelDefineType = async (data: ImageDataset, args: ModelD channels: 3 })); const shape = tf.shape(image).numpy(); - return this.model.predict(tf.reshape(image, [ 1 ].concat(shape.slice(0, 3)))).toString(); + return this.model.predict(tf.reshape(image, [ 1 ].concat(...shape.slice(0, 3)))).toString(); } }; return result; diff --git a/packages/plugins/model-define/tensorflow-resnet-model-define/package.json b/packages/plugins/model-define/tensorflow-resnet-model-define/package.json index 8b797dda2..d5654f44a 100644 --- a/packages/plugins/model-define/tensorflow-resnet-model-define/package.json +++ b/packages/plugins/model-define/tensorflow-resnet-model-define/package.json @@ -1,6 +1,6 @@ { "name": "@pipcook/plugins-tensorflow-resnet-model-define", - "version": "1.0.0", + "version": "1.0.1", "description": "resnet model of tensorflow", "main": "dist/index", "types": "dist/index", diff --git a/packages/plugins/model-define/tensorflow-resnet-model-define/src/index.ts b/packages/plugins/model-define/tensorflow-resnet-model-define/src/index.ts index 99c96c3cc..c5ca4af2b 100644 --- a/packages/plugins/model-define/tensorflow-resnet-model-define/src/index.ts +++ b/packages/plugins/model-define/tensorflow-resnet-model-define/src/index.ts @@ -114,7 +114,7 @@ const resnetModelDefine: ModelDefineType = async (data: ImageDataset, args: Mode channels: 3 })); const shape = tf.shape(image).numpy(); - return this.model.predict(tf.reshape(image, [ 1 ].concat(shape.slice(0, 3)))).toString(); + return this.model.predict(tf.reshape(image, [ 1 ].concat(...shape.slice(0, 3)))).toString(); } }; return result;