SciSharp / TensorFlow.NET

.NET Standard bindings for Google's TensorFlow for developing, training and deploying Machine Learning models in C# and F#.
https://scisharp.github.io/tensorflow-net-docs
Apache License 2.0
3.23k stars 517 forks source link

add image save as jpg and png funcion and testunit #1160

Closed dogvane closed 1 year ago

Oceania2018 commented 1 year ago

Please fix the UnitTest

Test run for D:\a\TensorFlow.NET\TensorFlow.NET\test\TensorflowNET.Hub.Unittest\bin\Debug\net6\Tensorflow.Hub.Unittest.dll (.NETCoreApp,Version=v6.0)
  Failed ImageSaveTest [14 s]
  Error Message:
   Test method TensorFlowNET.UnitTest.ImageTest.ImageSaveTest threw exception: 
Tensorflow.ValueError: Cannot use the default session to execute operation: the operation's graph is different from the session's graph. Pass an explicit session to run(session=sess).
  Stack Trace:
      at Tensorflow.ops._run_using_default_session(Operation operation, FeedItem[] feed_dict, Graph graph, Session session) in D:\a\TensorFlow.NET\TensorFlow.NET\src\TensorFlowNET.Core\ops.cs:line 505