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

[BUG Report]: GPU LSTM,erro:System.EntryPointNotFoundException:“Unable to find an entry point named 'TF_GetHandleShapeAndType' in DLL 'tensorflow'.” #1265

Open
xuse2008 opened this issue Jul 8, 2024 · 1 comment

Comments

@xuse2008
Copy link

xuse2008 commented Jul 8, 2024

Description

When CPU is OK,When GPU,then:
如图:
image

image

Reproduction Steps

No response

Known Workarounds

No response

Configuration and Other Information

Win11,cuda_11.8.0 cudnn-x86_64-8.6.0
No response

@Kristof-me
Copy link

Hello there! I'm not part of the dev team but I may have the workaround for you.
(I actually tested your code on Win10 and it actually runs with 0 issues.)

The problem

Native Windows GPU support is no longer a thing. If you read the docs they show you which versions are compatible. As you may see cuda 11.8 isn't even on the page...

WARNING

I can see that you try to use LSTM. This version of Tensorflow.NET can save this layer, but can't load it back (I couldn't find a version where this wasn't a problem).
Please check whether it's possible with your environment.

My solution

Just downgrade the version of your NuGet packages until native GPU support comes back. Right now this seems the fastest way to do it.
This you can train and run a model in this environment on GPU:

Package Version
SciSharp.TensorFlow.Redist-Windows-GPU 2.10.3
TensorFlow.Keras 0.11.4
TensorFlow.NET 0.110.4

But saving it could be problematic as I've mentioned.

Workaround

IF the save method actually supported save_formats which would be compatible with the Tensorflow python library then you could just simply save the model and use WSL2 for training. (This would require a little python scripting).
But right now this is not possible.

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