Skip to content

Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named 'TF_StringEncodedSize' in shared library 'tensorflow'. #6893

@fuszenecker

Description

@fuszenecker

System Information (please complete the following information):

  • OS & Version: Ubuntu Linux 22.04 LTS
  • ML.NET Version: 3.0.0
  • .NET Version: .NET 8.0

Describe the bug
When I try to train a model for image classification, I receive the exception below:

Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named 'TF_StringEncodedSize' in shared library 'tensorflow'.
   at Tensorflow.c_api.TF_StringEncodedSize(UInt64 len)
   at Microsoft.ML.Vision.ImageClassificationTrainer.EncodeByteAsString(VBuffer`1 buffer)
   at Microsoft.ML.Vision.ImageClassificationTrainer.ImageProcessor.ProcessImage(VBuffer`1& imageBuffer)
   at Microsoft.ML.Vision.ImageClassificationTrainer.CacheFeaturizedImagesToDisk(IDataView input, String labelColumnName, String imageColumnName, ImageProcessor imageProcessor, String inputTensorName, String outputTensorName, String cacheFilePath, Dataset dataset, Action`1 metricsCallback, Nullable`1 validationFraction)
   at Microsoft.ML.Vision.ImageClassificationTrainer.TrainModelCore(TrainContext trainContext)
   at Microsoft.ML.Trainers.TrainerEstimatorBase`2.TrainTransformer(IDataView trainSet, IDataView validationSet, IPredictor initPredictor)
   at Microsoft.ML.Trainers.TrainerEstimatorBase`2.Fit(IDataView input)
   at Microsoft.ML.Data.EstimatorChain`1.Fit(IDataView input)
   at Program.<Main>$(String[] args) in /home/fuszenecker/dev/zp/Program.cs:line 25

To Reproduce
Steps to reproduce the behavior:

  1. Update the SciSharp.TensorFlow.Redist package from 2.3.1 to 2.16.0.
  2. See error

Expected behavior
No exception received, the classification works as expected.

Screenshots, Code, Sample Projects

  <ItemGroup>
    <PackageReference Include="Microsoft.ML.Mkl.Redist" Version="3.0.0" />
    <PackageReference Include="Microsoft.ML.ImageAnalytics" Version="3.0.0" />
    <PackageReference Include="Microsoft.ML.Vision" Version="3.0.0" />
    <PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.16.0" />
  </ItemGroup>

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions