Closed
Description
I have an issue with Tensorflow.NET 0.70.1 and a multithreading console application:
I have the same problem with CPU or GPU native library, tensorflow 2.7.0.
Here you can find a sample project:
TensorflowMultithreadingTest.zip
Note: I cannot use using
for the inference because I need to reuse the same session, I don't think is feasible to create a new Session every time.
Note 2: Using modelSession.Dispose()
at the end of the processing or using GC.SuppressFinalize(modelSession)
after the declaration solve the problem, but I don't think it's the best solution.
Metadata
Metadata
Assignees
Labels
No labels