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

Namespace and Compilation Errors with TensorFlow.NET #1272

Open
Welcometohithub opened this issue Oct 2, 2024 · 0 comments
Open

Namespace and Compilation Errors with TensorFlow.NET #1272

Welcometohithub opened this issue Oct 2, 2024 · 0 comments

Comments

@Welcometohithub
Copy link

Description

Hello,

I'm using TensorFlow.NET for a machine learning project and facing issues with namespaces and compilation errors. Here’s a brief overview:

Environment:

  • TensorFlow.NET version: (specify your version)
  • IDE: Visual Studio 2019
  • OS: Windows 10

Problem:
I get several CS0246 errors stating that namespaces like Tensorflow.Keras.Optimizers and classes such as Adam, Dense, and LSTM cannot be found.

Code Snippet:

var model = new Sequential();
model.add(new LSTM(50, activation: "relu", input_shape: new Shape(1, 10)));
model.add(new Dense(1, activation: "sigmoid"));
model.compile(new Adam(), loss: "binary_crossentropy", metrics: new[] { "accuracy" });
Attempted Solutions:

Reinstalled TensorFlow.NET via NuGet.
Searched for namespace changes in the documentation and issues.
Could someone help me understand if there are recent changes to namespaces in TensorFlow.NET or provide guidance on how to fix these errors?

Thank you.

### Reproduction Steps

_No response_

### Known Workarounds

_No response_

### Configuration and Other Information

_No response_
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

1 participant