New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DeepLearning_ImageClassification_Training] Failed to run the sample. #689
Comments
I was not able to repro this issue.
I just updated the same sample (still not using GPU in the sample, though, since it needs to use a different NuGet package and you need to install CUDA, too), but can you try this new version of the sample? In the tests we're doing it works out-of-the-box. Read the Samples's README.MD if you want so see the changed highlighted compared to Preview1. Most of the changes are related to the in-memory images usage. Thanks, |
Thank you for reply. I have tried new version (preview-2) , but still i expierence exceptions... Program is running until line :
Still , at the begining of program execution i`m getting info :
Maybe this is causing errors during executing of the program ? |
The warning 'Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2' is normal. It comes from TensorFlow and it does not impact the training. I am not able to repro your problem as the sample works out of the box in all the machines we're trying. It must be related to the software/dependencies in the machine, OS version, not sure.. Can you provide details on what OS version (Win10?, Win7?, macOS?etc.) and related software (VS version?) you have installed, please? |
I`m working on Windows 10 Pro, Visual Studio 16.4.0 Preview 1.0 |
@codemzs - Any idea? Looks like a low level TensorFlow dependency issue? |
It’s because the meta file was not fully downloaded. @ashbhandare has fixed this issue. She can comment more. |
Thank you! I just updated my repository. And here comes another problem: |
Have you upgraded the image analytics nuget to the latest version? |
The version I used is 1.4.0-preview2, it's the latest but a preview version. |
Can you try deleting the TensorFlow meta file (all /BIN folder would do within your project) and re-compile and re-run? |
Well deleting meta didn`t help sadly , still same error. :(
|
The error was resolved when I modified the following in TextLoader.cs (project Microsoft.ML.Data): |
I'm also having this problem: "The size of input lines is not consistent Arg_ParamName_Name" at |
@codemzs - Any idea about this issue some folks are getting? |
How can I help to debug this issue? I would love to get this sample up and running. |
This exception looks different from the initial reported exception:
Can you add the stack trace and the complete exception message? |
Hi, I've got the same issue, here's my error message:
I think the image data is somehow not correct because just before the error during "Bottleneck Computation" phase, there are no image names shown. Expample:
|
The original issue "Google.Protobuf.InvalidProtocolBufferException" has been resolved. The second issue "The size of input lines is not consistent" is being tracked here: #717 |
Throwing an exception while defining the pipeline:
// 4. Define the model's training pipeline var pipeline = mlContext.Transforms.Conversion.MapValueToKey(outputColumnName: "LabelAsKey", inputColumnName: "Label", keyOrdinality: ValueToKeyMappingEstimator.KeyOrdinality.ByValue) .Append(mlContext.Model.ImageClassification("ImagePath", "LabelAsKey", arch: ImageClassificationEstimator.Architecture.ResnetV2101, epoch: 100, //An epoch is one learning cycle where the learner sees the whole training data set. batchSize: 30, // batchSize sets the number of images to feed the model at a time. It needs to divide the training set evenly or the remaining part won't be used for training. metricsCallback: (metrics) => Console.WriteLine(metrics), //OPTIONAL (*1*) validationSet: transformedValidationDataView));
Below are exception messages and stack trace:
Google.Protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length. at Google.Protobuf.CodedInputStream.RefillBuffer(Boolean mustSucceed) at Google.Protobuf.CodedInputStream.ReadRawBytes(Int32 size) at Google.Protobuf.CodedInputStream.ReadBytes() at Tensorflow.TensorProto.MergeFrom(CodedInputStream input) at Google.Protobuf.CodedInputStream.ReadMessage(IMessage builder) at Tensorflow.AttrValue.MergeFrom(CodedInputStream input) at Google.Protobuf.CodedInputStream.ReadMessage(IMessage builder) at Google.Protobuf.FieldCodec.<>c__DisplayClass16_0
1.b__0(CodedInputStream input)at Google.Protobuf.Collections.MapField
2.Codec.MessageAdapter.MergeFrom(CodedInputStream input) at Google.Protobuf.CodedInputStream.ReadMessage(IMessage builder) at Google.Protobuf.Collections.MapField
2.AddEntriesFrom(CodedInputStream input, Codec codec)at Tensorflow.NodeDef.MergeFrom(CodedInputStream input)
at Google.Protobuf.CodedInputStream.ReadMessage(IMessage builder)
at Google.Protobuf.FieldCodec.<>c__DisplayClass16_0
1.<ForMessage>b__0(CodedInputStream input) at Google.Protobuf.Collections.RepeatedField
1.AddEntriesFrom(CodedInputStream input, FieldCodec1 codec) at Tensorflow.GraphDef.MergeFrom(CodedInputStream input) at Google.Protobuf.CodedInputStream.ReadMessage(IMessage builder) at Tensorflow.MetaGraphDef.MergeFrom(CodedInputStream input) at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, Byte[] data) at Google.Protobuf.MessageParser
1.ParseFrom(Byte[] data)at Tensorflow.saver._import_meta_graph_with_return_elements(String meta_graph_or_file, Boolean clear_devices, String import_scope, String[] return_elements)
at Microsoft.ML.Transforms.Dnn.DnnUtils.<>c__DisplayClass5_0.b__0(Graph graph)
at Tensorflow.Python.tf_with[TIn,TOut](TIn py, Func
2 action)
The text was updated successfully, but these errors were encountered: