forked from tensorflow/tfjs-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Update #2
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
Merged
Merged
Update #2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INTERNAL
…dense matrix to texture. (#1793) PERF
DEV This makes the directory structure align with the NPM package structure more closely. This has the added effect of making syncing to google3 much saner (one BUILD rule for each of the top-level NPM packages).
FEATURE - Add support for deserializing weights of dtype `string` - Allow string tensors in `tile` and `expandDims` ops (these ops are used by AutoML) - Add utf-8 encoding/decoding capability to `Platform` This is needed to enable execution of AutoML models, which store the vocab as a weight (`Const` tensor) of dtype `string`. Corresponding change in tfjs-converter: tensorflow/tfjs-converter#386
…1803) * Fix trainingConfig typing & export * Save * Revise fromMemory() for trainingConfig
DEV This is so that we can sync to google3. We don't yet update the typescript version compiled here since google3 is not 3.5.2 yet. Once google3 moves to 3.5.2 so will we.
INTERNAL
* Only cleanup canvas if it exists. This helps for platforms using the WebGL env without actually having a DOM canvas to use. Offscreen usage will fail on unit tests without this check on this.canvas. * Equality check fix. * One more fix.
Converter fails because it includes it's own scripts in its build process (this is a separate issue I will fix). I didn't call build-npm because it calls rollup which will slow down the integration tests. DEV
FEATURE PERF
FEATURE To align with TensorFlow Python/C++, this PR changes the way we serialize strings in the weights format, and in our engine. - We store the underlying encoded string bytes as `Uint8Array`. Thus a string tensors (which has multiple strings) is backed by `Uint8Array[]`. - To keep backwards compatibility, `tensor.data()` returns `string[]`, which means that we try to utf-8 decode a string. - In the weights format, string bytes are kept unchanged, with their original encoding. Each string is prefixed with 4 bytes denoting the number of bytes in the string. Thus, a string tensor of 3 values will be encoded as `[4 bytes][string1...][4 bytes][string2...][4 bytes][string3....]` - Add `util.encodeString(text: string, encoding?: string)` and `util.decodeString(bytes: Uint8Array, encoding?: string)`, along with the respective `Platform` methods - Add `tensor.bytes()` which gives the underlying bytes of the data - `Uint8Array` for any numeric tensor, and `Uint8Array[]` for string tensors. Corresponding change in tfjs-converter: tensorflow/tfjs-converter#386
DEV Adding browser.crypto: false to package.json results in not including crypto and it's dependencies when using `browserify` and `parcel` as bundlers for an end application. Test used: I made a hello-world js application that depends on tfjs-core. Expected my bundle to be ~500kb, but I got 810kb. This fixed the issue
FEATURE Add fromPixels support for webworker
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To see the logs from the Cloud Build CI, please join either
our discussion
or announcement mailing list.