From 60afa45eec33c5f7b811671979a9bcc300e38497 Mon Sep 17 00:00:00 2001 From: Rajeshwar Reddy T <43972606+rthadur@users.noreply.github.com> Date: Sat, 25 Jan 2020 12:16:17 -0800 Subject: [PATCH 1/5] Update saved_model.ts --- tfjs-node/src/saved_model.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tfjs-node/src/saved_model.ts b/tfjs-node/src/saved_model.ts index afdbc17877b..5f40dd58f8a 100644 --- a/tfjs-node/src/saved_model.ts +++ b/tfjs-node/src/saved_model.ts @@ -427,6 +427,8 @@ function mapTFDtypeToJSDtype(tfDtype: string): DataType { return 'float32'; case 'DT_INT32': return 'int32'; + case 'DT_INT64': + return 'int64'; case 'DT_BOOL': return 'bool'; case 'DT_COMPLEX64': From b785be8743f3b1966b82e42f85c47cd4ac6c278a Mon Sep 17 00:00:00 2001 From: Rajeshwar Reddy T <43972606+rthadur@users.noreply.github.com> Date: Mon, 27 Jan 2020 15:01:48 -0800 Subject: [PATCH 2/5] Update saved_model.ts --- tfjs-node/src/saved_model.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tfjs-node/src/saved_model.ts b/tfjs-node/src/saved_model.ts index 5f40dd58f8a..6d0f7c192a3 100644 --- a/tfjs-node/src/saved_model.ts +++ b/tfjs-node/src/saved_model.ts @@ -427,8 +427,6 @@ function mapTFDtypeToJSDtype(tfDtype: string): DataType { return 'float32'; case 'DT_INT32': return 'int32'; - case 'DT_INT64': - return 'int64'; case 'DT_BOOL': return 'bool'; case 'DT_COMPLEX64': @@ -436,7 +434,7 @@ function mapTFDtypeToJSDtype(tfDtype: string): DataType { case 'DT_STRING': return 'string'; default: - throw new Error('Unsupported tensor DataType: ' + tfDtype); + throw new Error('Unsupported tensor DataType: ' + tfDtype + ', try to modify the model in python to convert the datatype' ); } } From 1970d60f91c30e896fa1025ea64f81f5e36603f6 Mon Sep 17 00:00:00 2001 From: Rajeshwar Reddy T <43972606+rthadur@users.noreply.github.com> Date: Mon, 27 Jan 2020 15:03:04 -0800 Subject: [PATCH 3/5] Update saved_model.ts --- tfjs-node/src/saved_model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tfjs-node/src/saved_model.ts b/tfjs-node/src/saved_model.ts index 6d0f7c192a3..a968be8523b 100644 --- a/tfjs-node/src/saved_model.ts +++ b/tfjs-node/src/saved_model.ts @@ -434,7 +434,8 @@ function mapTFDtypeToJSDtype(tfDtype: string): DataType { case 'DT_STRING': return 'string'; default: - throw new Error('Unsupported tensor DataType: ' + tfDtype + ', try to modify the model in python to convert the datatype' ); + throw new Error('Unsupported tensor DataType: ' + tfDtype + + ', try to modify the model in python to convert the datatype' ); } } From cd368a622fed19faf9bef02354c96f18b3ccf85e Mon Sep 17 00:00:00 2001 From: Rajeshwar Reddy T <43972606+rthadur@users.noreply.github.com> Date: Mon, 27 Jan 2020 15:11:07 -0800 Subject: [PATCH 4/5] Update saved_model.ts --- tfjs-node/src/saved_model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tfjs-node/src/saved_model.ts b/tfjs-node/src/saved_model.ts index a968be8523b..d2692bcca51 100644 --- a/tfjs-node/src/saved_model.ts +++ b/tfjs-node/src/saved_model.ts @@ -362,7 +362,8 @@ export class TFSavedModel implements InferenceModel { * function. The directory also has a variables directory contains a standard * training checkpoint. The directory may also has a assets directory contains * files used by the TensorFlow graph, for example text files used to initialize - * vocabulary tables. For more information, see this guide: + * vocabulary tables. These are supported datatypes: float32, int32, complex64, + * string.For more information, see this guide: * https://www.tensorflow.org/guide/saved_model. * * @param path The path to the SavedModel. From e902b103421ecbb05d544d048cfde31cf1c18f45 Mon Sep 17 00:00:00 2001 From: Rajeshwar Reddy T <43972606+rthadur@users.noreply.github.com> Date: Mon, 27 Jan 2020 15:27:50 -0800 Subject: [PATCH 5/5] Update saved_model.ts --- tfjs-node/src/saved_model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfjs-node/src/saved_model.ts b/tfjs-node/src/saved_model.ts index d2692bcca51..d0b87201085 100644 --- a/tfjs-node/src/saved_model.ts +++ b/tfjs-node/src/saved_model.ts @@ -436,7 +436,7 @@ function mapTFDtypeToJSDtype(tfDtype: string): DataType { return 'string'; default: throw new Error('Unsupported tensor DataType: ' + tfDtype + - ', try to modify the model in python to convert the datatype' ); + ', try to modify the model in python to convert the datatype' ); } }