From 8ec4c6a02a047fc8ff17bbf91437f640b2461ecc Mon Sep 17 00:00:00 2001 From: Stephane Dallongeville <stephane.dallongeville@pasteur.fr> Date: Wed, 25 May 2022 15:57:10 +0200 Subject: [PATCH] Fixed InvalidProtocolBufferException throwing ( org.nd4j.shade.protobuf.InvalidProtocolBufferException, not the google.protobuf one) --- src/main/java/tensorflow/v1/Tensorflow1Interface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tensorflow/v1/Tensorflow1Interface.java b/src/main/java/tensorflow/v1/Tensorflow1Interface.java index c9ae2ab..e80a57d 100644 --- a/src/main/java/tensorflow/v1/Tensorflow1Interface.java +++ b/src/main/java/tensorflow/v1/Tensorflow1Interface.java @@ -71,7 +71,7 @@ public class Tensorflow1Interface implements DeepLearningInterface byte[] byteGraph = model.metaGraphDef(); try { sig = MetaGraphDef.parseFrom(byteGraph).getSignatureDefOrThrow("serving_default"); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { + } catch (InvalidProtocolBufferException e) { throw new LoadModelException(); } } -- GitLab