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

tf.data does not work in Edge Browser #1395

Closed
DJCordhose opened this issue Mar 16, 2019 · 3 comments
Closed

tf.data does not work in Edge Browser #1395

DJCordhose opened this issue Mar 16, 2019 · 3 comments
Assignees

Comments

@DJCordhose
Copy link

TensorFlow.js version

1.0.1

Browser version

Windows 10, Edge 44.17763.1.0

Describe the problem or feature request

loading data using tf.data does not work, since

https://github.com/tensorflow/tfjs-data/blob/master/src/iterators/byte_chunk_iterator.ts#L96

uses

https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder

which is not supported in Edge.

Code to reproduce the bug / link to feature request

https://djcordhose.github.io/crash-risk-calculator/

@DJCordhose DJCordhose changed the title tf.data does not work in Ede Browser tf.data does not work in Edge Browser Mar 16, 2019
@Kriyszig
Copy link
Contributor

Kriyszig commented Apr 2, 2019

Can we add a polyfill for TextDecoder? We are using it decode UTF-8 encoded entities so a polyfill specific to UTF-8 should be enough.
Maybe we can just use https://gist.github.com/Yaffle/5458286 [comes with the license attached]

@kangyizhang
Copy link
Contributor

tfjs-core is also using TextDecoder.

@dsmilkov what do you think?

@dsmilkov
Copy link
Contributor

dsmilkov commented Aug 19, 2019

Hi @Kriyszig and @DJCordhose,

Since Edge is moving to Chromium, it will have built-in TextDecoder. We won't be baking polyfill into tf.data to keep the library size small and avoid extra code for browsers/platforms that do have it built-in.

You have two options:

  1. (Recommended) Provide your own polyfill. E.g. see text-encoding library
  2. Provide your own platform which is an object that implements our Platform interface and provide your own encode() and decode() implementations. See PlatformReactNative() as an example.

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