神刀安全网

Tensorflow Image Recognition Tutorial

Loading a TensorFlow graph

To load a pre-trained TensorFlow graphs in MLDB, we use the tensorflow.graph function type .

Below, we start by creating two functions. First, the fetcher function allows us to fetch a binary blob from a remote URL. Second, the inception function that will be used to execute the trained network and that we parameterize in the following way:

  • modelFileUrl : Path to the Inception-v3 model file. The archive prefix and # separator allow us to load a file inside a zip archive. (more details)
  • input : As input to the graph, we provide the output of the fetch function called with the url parameter. When we call it later on, the image located at the specified URL will be downloaded and passed to the graph.
  • output : This specifies the layer from which to return the values. The softmax layer is the last layer in the network so we specify that one.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Tensorflow Image Recognition Tutorial

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址