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

callbacks in autoencoder #150

Open
satrum opened this issue Dec 16, 2019 · 5 comments
Open

callbacks in autoencoder #150

satrum opened this issue Dec 16, 2019 · 5 comments

Comments

@satrum
Copy link

satrum commented Dec 16, 2019

How can i implement callback parameter in fit moder Autoencoder ?
There is not parameter.

from keras.callbacks.callbacks import EarlyStopping
cb_earlystop = EarlyStopping(monitor='val_loss', min_delta=0, patience=0, verbose=0,
mode='auto', baseline=None, restore_best_weights=False)
pyod_model.fit(scaler, callbacks=[cb_earlystop])

TypeError: fit() got an unexpected keyword argument 'callbacks'

Can you implement this parameter? Its very usefull for monitor, early stop and another cases.

@yzhao062
Copy link
Owner

Thanks for noting me on this. I would be happy to add this in...while may take some time. You could overwrite the autoencoder module to get it for now...

@yzhao062
Copy link
Owner

or maybe @ZainNasrullah can do this?

@ZainNasrullah
Copy link
Collaborator

ZainNasrullah commented Dec 18, 2019

Hi satrum and Yue,

I added keyword arguments to the fit call on the autoencoder. This should allow you to pass any additional keras arguments including callbacks. I've also updated the auto encoder example to include your callback and no longer receive the type error mentioned in the initial post.

Can you test this implementation (b401c32) and let me know if this is what you were looking for? If so, we'll include it in a future release.

Update: Quick reminder to test in a virtual environment where pyod is not already installed (safest bet is to do a fresh install via github and the provided commit hash) or you may be running the existing implementation instead of the modified one.

@WorksWellWithOthers
Copy link

Did this ever make it to a release?

@saraghasemifp
Copy link

Are there any releases that have this?

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

No branches or pull requests

5 participants