Closed DanBrook closed 4 years ago
Hi @DanBrook, I have this sample run locally without any exceptions. Have you installed the following nuget packages? Microsoft.ML Microsoft.ML.ImageAnalytics SciSharp.TensorFlow.Redist Microsoft.ML.TensorFlow
Hi @DanBrook,
Your error seems to be because of missing SciSharp.TensorFlow
NuGet packages in your project. Have you downloaded this SciSharp NuGet package for training on CPU? If so, please confirm you have done so, so that we can investigate any further possible scenarios. If not, we will close this issue as it most likely is due to the missing SciSharp NuGet package. Thanks!
Hi @mstfbl!
Thank you, for fast response. I have downloaded scisharp and have tried to install it from VS and manually, and different versions. Nothing helped. It looks like scisharp installed properly but I still have this error
Hi @DanBrook , Seems like this linkage issue of SciSharp(Thanks @mstfbl for narrowing down the problem) is probably caused by VS on your machine, Can you try install another VS with different version?(This may not be a good solution but sometimes works) Meanwhile, have you tried deleting the binaries and rebuilding the solution? Thanks
Hi @wangyems, I have tried to rebuild and delete binaries. Today I have updated my VS for the last version and my windows too. Reloaded SciSharp and all its dependencies. Still have the same problem.
Hey @DanBrook ,
In this case, please share your project with us by following the directions here. We can better support you if we can debug your project with the exact installed packages. You can also email your .zip to Ye and I if you wish. Emails: wangye@microsoft.com, mubal@microsoft.com.
Closing this issue now. Please feel free to reopen it if you still have any issues.
System information
Windows 10 pro/18362.836: .NET 4.7.2:
Issue
Got error “Missing method exception NumSharp.Shape TensorFlow.TensorShape.op_implicit” on fit, while trying to run Microsoft example for ML image classification.
Code:
IEstimator pipeline = mlContext.Transforms.LoadImages(outputColumnName: "input", imageFolder: _imagesFolder, inputColumnName: nameof(ImageData.ImagePath))
// The image transforms transform the images into the model's expected format.
.Append(mlContext.Transforms.ResizeImages(outputColumnName: "input", imageWidth: InceptionSettings.ImageWidth, imageHeight: InceptionSettings.ImageHeight, inputColumnName: "input"))
.Append(mlContext.Transforms.ExtractPixels(outputColumnName: "input", interleavePixelColors: InceptionSettings.ChannelsLast, offsetImage: InceptionSettings.Mean))
.Append(mlContext.Model.LoadTensorFlowModel(_inceptionTensorFlowModel). ScoreTensorFlowModel(outputColumnNames: new[] { "softmax2_pre_activation" }, inputColumnNames: new[] { "input" }, addBatchDimensionInput: true))
.Append(mlContext.Transforms.Conversion.MapValueToKey(outputColumnName: "LabelKey", inputColumnName: "Label"))
.Append(mlContext.MulticlassClassification.Trainers.LbfgsMaximumEntropy(labelColumnName: "LabelKey", featureColumnName: "softmax2_pre_activation"))
.Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabelValue", "PredictedLabel")) .AppendCacheCheckpoint(mlContext);
IDataView trainingData = mlContext.Data.LoadFromTextFile(path: _trainTagsTsv, hasHeader: false);
//code above is working properly data preview shows proper data was loaded
ITransformer model = pipeline.Fit(trainingData); // fit ends with error
Numsharp is v0. 20. 5