Modify configuration: Tensorflow.ConfigProto not available
jpsalada opened this issue · comments
Dear all,
In your example projects you use the class Tensorflow.ConfigProto, to configure the session. However this class is not available anywhere. Also since Session or ConfigProto in Tensorflow 2.x have been deprecated, how do we configure tensorflow using EMGUTF. What I am trying to configure are the following configs:
intra_op_parallelism_threads
inter_op_parallelism_threads
Thank you
Session is not availabe on Tensorflow 2.x Python API, but they are still available & are required in Tensorflow v2.4.1 C-API.
https://github.com/tensorflow/tensorflow/blob/v2.4.1/tensorflow/c/c_api.h#L156
In order to use Tensorflow.ConfigProto, you will need to install the Emgu.TF.Protobuf package:
https://www.nuget.org/packages/Emgu.TF.Protobuf/
Sample usage to setup ConfigProto (with a resnet saved model trained in TF 2.x) can be found here:
https://github.com/emgucv/emgutf/blob/2.4.0/Emgu.TF.Example/XamarinForms/XamarinForms/ResnetPage.cs#L48