You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add tf.util.fetch() as a cross-platform utility which mimics browser's fetch.
The weights loader should use this util instead of the global fetch (see weights_loader.ts) if the user hasn't provided a custom fetchFunc.
tf.util.fetch() should first check for the existence of a global fetch using tf.ENV.global.fetch. Then fallback for platform-specific solutions. The current platform-specific solution should be to use node-fetch when the environment is node.
Platforms such as wechat can override their global fetch fetch = customFetch, which will then be used by all fetching inside the TF.js eco-system (model loading, weights loading, etc)
The text was updated successfully, but these errors were encountered:
Add
tf.util.fetch()
as a cross-platform utility which mimics browser'sfetch
.The weights loader should use this util instead of the global fetch (see weights_loader.ts) if the user hasn't provided a custom
fetchFunc
.tf.util.fetch()
should first check for the existence of a global fetch usingtf.ENV.global.fetch
. Then fallback for platform-specific solutions. The current platform-specific solution should be to usenode-fetch
when the environment is node.Platforms such as wechat can override their global fetch
fetch = customFetch
, which will then be used by all fetching inside the TF.js eco-system (model loading, weights loading, etc)The text was updated successfully, but these errors were encountered: