Skip to content

Getting Google.Protobuf.InvalidProtocolBufferException when movng from Tensorflow .Net version from 0.10.10 to 0.11.2 #383

@ashbhandare

Description

@ashbhandare

Was upgrading the TF.Net version used in ML .Net project from 0.10.10 to 0.11.2.
Error occurs when the Saver tries to save the graph.

Google.Protobuf.InvalidProtocolBufferException
HResult=0x80131620
Message=Protocol message was too large. May be malicious. Use CodedInputStream.SetSizeLimit() to increase the size limit.
Source=Google.Protobuf
StackTrace:
at Google.Protobuf.CodedInputStream.RefillBuffer(Boolean mustSucceed)
at Google.Protobuf.CodedInputStream.get_IsAtEnd()
at Google.Protobuf.CodedInputStream.ReadTag()
at Google.Protobuf.CodedInputStream.PeekTag()
at Google.Protobuf.Collections.MapField2.AddEntriesFrom(CodedInputStream input, Codec codec) at Tensorflow.NodeDef.MergeFrom(CodedInputStream input) at Google.Protobuf.CodedInputStream.ReadMessage(IMessage builder) at Google.Protobuf.FieldCodec.<>c__DisplayClass16_01.b__0(CodedInputStream input)
at Google.Protobuf.Collections.RepeatedField1.AddEntriesFrom(CodedInputStream input, FieldCodec1 codec)
at Tensorflow.GraphDef.MergeFrom(CodedInputStream input)
at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, Stream input)
at Google.Protobuf.MessageParser`1.ParseFrom(Stream input)
at Tensorflow.Graph._as_graph_def(Boolean add_shapes)
at Tensorflow.Saver.save(Session sess, String save_path, Int32 global_step, String latest_filename, String meta_graph_suffix, Boolean write_meta_graph, Boolean write_state, Boolean strip_default_attrs, Boolean save_debug_info)
at Microsoft.ML.Transforms.ImageClassificationTransformer.TrainAndEvaluateClassificationLayer(String trainBottleneckFilePath, Options options, String validationSetBottleneckFilePath) in C:\Users\aibhanda\Source\Repos\ashbhandare-machinelearning\src\Microsoft.ML.Dnn\ImageClassificationTransform.cs:line 331

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions