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

Problem with ALAD model training #570

Open
FNikkhoo opened this issue May 13, 2024 · 2 comments
Open

Problem with ALAD model training #570

FNikkhoo opened this issue May 13, 2024 · 2 comments

Comments

@FNikkhoo
Copy link

Hello everyone,

I'm attempting to utilize the ALAD model for both training and inference on my custom dataset. However, I'm encountering an error that suggests certain portions of the main code in pyod/models/alad.py need modification. I'm including the code snippet I'm using for reference, along with the corresponding error message. Any assistance would be greatly appreciated. Additionally, I'm curious to know if anyone has successfully tested the ALAD model on a custom dataset.

My code Snippet:
x_train_normal = np.load('x_train_normal.npy')
from pyod.models.alad import ALAD
ecod_model = ALAD()
ecod_model.fit(x_train_normal)

Error:
lueError: A KerasTensor cannot be used as input to a TensorFlow function. A KerasTensor is a symbolic placeholder for a shape and dtype, used when constructing Keras Functional models or Keras Functions. You can only use it as input to a Keras layer or a Keras operation (from the namespaces keras.layers and keras.operations).

@yzhao062
Copy link
Owner

This is caused by keras update -- please use keras<3.0. we are trying to fully remove all tensorflow based implementation in the next few versions.

@FNikkhoo
Copy link
Author

This is caused by keras update -- please use keras<3.0. we are trying to fully remove all tensorflow based implementation in the next few versions.

Thank you for your prompt response. I will try downgrading to keras<3.0 if it doesn’t cause additional conflicts. I appreciate your help and the update on future changes.
Best regards,

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