我已按照(https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet/get-started/windows)中提供的步骤在10分钟内开始使用ML.NET。
但是在运行应用程序时。控制台正在通过以下运行时错误。
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Parsing failed with an exception: Stream reading encountered exception ---> System.FormatException: Stream reading encountered exception ---> System.IO.FileNotFoundException: Could not find file 'C:\XXXX\MLNetExampleA\iris-data.txt'.
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Microsoft.ML.Runtime.SimpleFileHandle.OpenReadStream()
at Microsoft.ML.Runtime.Data.FileHandleSource.OpenTextReader(Int32 index)
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.LineReader.ThreadProc()
--- End of inner exception stack trace ---
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.LineReader.GetBatch()
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.ParallelState.Parse(Int32 tid)
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.ParallelState.ThreadProc(Object obj)
--- End of inner exception stack trace ---
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.<ParseParallel>d__33.MoveNext()
at Microsoft.ML.Runtime.Data.TextLoader.Cursor.MoveNextCore()
at Microsoft.ML.Runtime.Data.RootCursorBase.MoveNext()
at Microsoft.ML.Runtime.Data.TermTransform.Train(IHostEnvironment env, IChannel ch, ColInfo[] infos, ArgumentsBase args, ColumnBase[] column, IDataView trainingData)
at Microsoft.ML.Runtime.Data.TermTransform..ctor(ArgumentsBase args, ColumnBase[] column, IHostEnvironment env, IDataView input)
at Microsoft.ML.Runtime.Data.TermTransform..ctor(IHostEnvironment env, Arguments args, IDataView input)
at Microsoft.ML.Runtime.Transforms.TextAnalytics.TermTransform(IHostEnvironment env, Arguments input)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at Microsoft.ML.Runtime.EntryPoints.EntryPointNode.Run()
at Microsoft.ML.Runtime.EntryPoints.EntryPointGraph.RunNode(EntryPointNode node)
at Microsoft.ML.Runtime.EntryPoints.JsonUtils.GraphRunner.RunAllNonMacros()
at Microsoft.ML.Runtime.EntryPoints.JsonUtils.GraphRunner.RunAll()
at Microsoft.ML.LearningPipeline.Train[TInput,TOutput]()
at MLNetExampleA.Program.Main(String[] args) in C:\XXXX\MLNetExampleA\Program.cs:line 70
答案 0 :(得分:3)
错误表明
75012
75016
94400
94500
94300
78400
您是否遵循并验证了文件实际上已复制到输出文件夹?