Comments (8)
Plummeting problem fixed; Lookahead appears strongly bound to its internal optimizer's state - the problem was solved by loading the iterations
attribute, which before was thrown out as Nadam itself worked better that way. The iterations
attr mediates Nadam's momentum - lower = lower, down to half of max. Same holds for abruptly changing .lr
. Not rigorous evidence though, as still unsure whether Lookahead's properly implemented.
from keras-lookahead.
Fixed.
from keras-lookahead.
@CyberZHG That was fast - thanks; I'll test it shortly. To clarify, is below
self.weights = self.optimizer.weights + slow_params
applying weight updates to self.weights
, while Keras applies updates to self.optimizer.weights
via self.updates
? That is, if this is the only weight update, then before this fix, the 'slow' parameters weren't accounted for at all.
from keras-lookahead.
Tested - model.optimizer.weights
now holds weights, but also,
len(model.optimizer.updates) == len(model.optimizer.optimizer.updates) # 171 == 171
len(model.optimizer.weights) > len(model.optimizer.optimizer.weights) # 137 > 103
# up to matching len, the two sets of weights are all equal
Is this intended? If so, was this accounted for before? It may explain my poor model performance. A snippet of the point where the weight tensors differ below:
(Also, optimizer save size has increased - unless the exact partial duplicate is necessary, better without it)
from keras-lookahead.
Something's faulty - model performance plummets when loading states/weights and re-compiling model for a different batch_shape
(greater timesteps
); it behaves as if nothing was loaded, not even layer weights; I check that optimizer weights are loaded as saved
(val spikes should coincide with train spikes - plot error)
from keras-lookahead.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from keras-lookahead.
To clarify, is the weight len discrepancy mentioned in my third comment intentional or a bug?
from keras-lookahead.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from keras-lookahead.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-lookahead.