Posts

Showing posts with the label Tensorflow Hub

Can A TensorFlow Hub Module Be Used In TensorFlow 2.0?

Answer : In Tensorflow 2.0 you should be using hub.load() or hub.KerasLayer() . [April 2019] - For now only Tensorflow 2.0 modules are loadable via them. In the future many of 1.x Hub modules should be loadable as well. For the 2.x only modules you can see examples in the notebooks created for the modules here this function load will work with tensorflow 2 embed = hub.load("https://tfhub.dev/google/universal-sentence-encoder-large/3") instead of embed = hub.Module("https://tfhub.dev/google/universal-sentence-encoder-large/3") [this is not accepted in tf2] use hub.load()