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

The formula of adaptive_std in your code may be wrong #1

Open
josephlau opened this issue May 11, 2021 · 2 comments · May be fixed by #2
Open

The formula of adaptive_std in your code may be wrong #1

josephlau opened this issue May 11, 2021 · 2 comments · May be fixed by #2
Assignees

Comments

@josephlau
Copy link

fn = lambda elem: K.switch(K.less_equal(elem, 1.0), K.ones_like(elem), elem)
adaptive_std = K.map_fn(fn, adaptive_std)

In author's code is
adaptive_std[adaptive_std <= self.eps] = 1

which self.eps = 1e-8

@josephlau
Copy link
Author

Btw, change to tf.where() from map_fn results much faster training time

@llouislu llouislu self-assigned this Jul 17, 2021
llouislu added a commit that referenced this issue Jul 17, 2021
update adaptive_std with tf.where()
@llouislu llouislu linked a pull request Jul 17, 2021 that will close this issue
@llouislu
Copy link
Owner

@josephlau Can you please test my updated code https://github.com/llouislu/tensorflow-dain/tree/bugfix-1 if you're still interested? as I don't have access to data and environment to test dain at the moment.

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

Successfully merging a pull request may close this issue.

2 participants