Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify configuration: Tensorflow.ConfigProto not available #60

Open
jpsalada opened this issue Mar 16, 2021 · 1 comment
Open

Modify configuration: Tensorflow.ConfigProto not available #60

jpsalada opened this issue Mar 16, 2021 · 1 comment

Comments

@jpsalada
Copy link

jpsalada commented Mar 16, 2021

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

@emgucv
Copy link
Owner

emgucv commented Mar 16, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants