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

Remove usage of constructor.name in optimizers.ts #82

Closed
nsthorat opened this issue Apr 3, 2018 · 0 comments · Fixed by tensorflow/tfjs-layers#108
Closed

Remove usage of constructor.name in optimizers.ts #82

nsthorat opened this issue Apr 3, 2018 · 0 comments · Fixed by tensorflow/tfjs-layers#108
Assignees

Comments

@nsthorat
Copy link
Contributor

nsthorat commented Apr 3, 2018

TensorFlow.js version

0.6.1 - using minified bundle

Describe the problem or feature request

We are using constructor.name here which gets minified when using the standalone bundle:
https://github.com/tensorflow/tfjs-layers/blob/8e8b1a3265440573950ef5c1e41c2efd9a6a6a47/src/optimizers.ts#L466

Then it throws an error :)

Code to reproduce the bug / link to feature request

  const optimizer = tf.train.adam(0.0001);
  
  model.compile({optimizer, loss: 'categoricalCrossentropy'});
@nsthorat nsthorat self-assigned this Apr 3, 2018
nsthorat pushed a commit to tensorflow/tfjs-layers that referenced this issue Apr 3, 2018
This PR removes LayersOptimizers.

We will push serialization logic down into core optimizers (getConfig and fromConfig). Now, we allow any subclass of `tf.Optimizer` to be passed and we don't whitelist the core optimizers by constructor name (which causes problems with bundlizing).

This fixes tensorflow/tfjs#82
easadler pushed a commit to easadler/tfjs that referenced this issue Apr 12, 2018
* Make sure to launch http server after initial bundle

Since demo code depends on the bundle.js, http server should be launched
just after initial bundle creation.
nsthorat pushed a commit that referenced this issue Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant