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

Error when running model.fit after upgrade tensorflow.net to v0.150 #1238

Open
kojack14 opened this issue Mar 18, 2024 · 1 comment
Open

Comments

@kojack14
Copy link

Description

I am getting this error : Unable to find an entry point named 'TF_GetHandleShapeAndType' in DLL 'tensorflow'. My code :
for (int j = 0; j < trainingParameters.loopQtd; j++)
{

var samples = PrepareDataTraining(trainingParameters, ref Id, j, 1, scheduleModel.id_aa,trainingParameters.modeltype);
var test = TestDataNDArray(samples, trainingParameters.testRatio);
test = test.reshape(new Shape(1, (int)test.shape[0], (int)test.shape[1]));
test = Transpose(test, 1, (int)samples.shape[2], (int)samples.shape[1]);
var history = trainingParameters.model.fit(
            samples,
            samples,
            trainingParameters.bacthsize,
            epochs: 1,
            verbose: 1,
            validation_data: (test, test),
            use_multiprocessing: false
            );
auxLoss.add(history.history["loss"]);
auxvalLoss.add(history.history["val_loss"]);
auxerroVal.add(history.history["val_mean_absolute_error"]);
auxerroTrain.add(history.history["mean_absolute_error"]);

}

@Jucko13
Copy link
Contributor

Jucko13 commented May 27, 2024

I encountered the same problem. What happened was that the tensorflow.dll in my release folder did not get updated. I grabbed the newest dll from the packages folder and placed it in the release or debug folder manually.

Path to the dll:
<solution folder>\packages\SciSharp.TensorFlow.Redist.2.16.0\runtimes\win-x64\native\tensorflow.dll

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