Shark Deng

Interactive Designer @Shanju Design in Shanghai

touched caffe / mxnet / python / wordpress / bootstrap / Arduino / Raspberry Pi / webgl / three.js / PIXI / 3dMax

Email

Github

TensorFlow hub 下载代码

2019-11-18 23:00:12

转载:https://blog.csdn.net/lipengcn/article/details/80469769

import tensorflow as tf
import tensorflow_hub as hub

def test():
embed = hub.Module(“https://tfhub.dev/google/universal-sentence-encoder-large/1”)
embeddings = embed([“The quick brown fox jumps over the lazy dog.”])
sess = tf.Session()
sess.run(tf.initialize_all_variables())
sess.run(tf.initialize_all_tables())
print(sess.run(embeddings))

if __name__ == “__main__”:
test()



——By SharkDeng
如果你喜欢我的文章,欢迎红包赞赏

Leave a Reply

Your email address will not be published. Required fields are marked *