TensorFlowSharp icon indicating copy to clipboard operation
TensorFlowSharp copied to clipboard

Cannot Load the Model

Open lexyleinchen opened this issue 2 years ago • 0 comments

Code

string imgModelPath = System.IO.Path.Combine(assemblyDirectory, "models\\img\\" + "saved_model.pb");

// Load Image AI
await Task.Run(() => ImgAI.StartAI(imgModelPath));
public static async Task StartAI(string modelPath)
{
    try
    {
        // Load the pre-trained model
        graph = new TFGraph();
        graph.Import(File.ReadAllBytes(modelPath));
    }
    catch (Exception ex)
    {
        // Handle the exception (log, display a message, etc.)
        MessageBox.Show($"Exception: {ex.Message}");
    }
}

used Model https://www.kaggle.com/models/deepmind/biggan/frameworks/TensorFlow1/variations/128/versions/2

Expected behavior I expect that the model will load but i get an error insted.

Screenshots image

Desktop

  • OS: Windows 11 23H2 x64-based
  • .Net: 8.0.0
  • Version: 1.15.1

lexyleinchen avatar Dec 15 '23 11:12 lexyleinchen