相关疑难解决方法(0)

TensorFlow估算器ServingInputReceiver的功能与Receiver_tensors的比较:何时以及为什么?

在上一个问题中,serving_input_receiver_fn探讨了的目的和结构,并在回答中

def serving_input_receiver_fn():
  """For the sake of the example, let's assume your input to the network will be a 28x28 grayscale image that you'll then preprocess as needed"""
  input_images = tf.placeholder(dtype=tf.uint8,
                                         shape=[None, 28, 28, 1],
                                         name='input_images')
  # here you do all the operations you need on the images before they can be fed to the net (e.g., normalizing, reshaping, etc). Let's assume "images" is the resulting tensor.

  features = {'input_data' : images} # this …
Run Code Online (Sandbox Code Playgroud)

python tensorflow tensorflow-estimator

15
推荐指数
1
解决办法
2004
查看次数

标签 统计

python ×1

tensorflow ×1

tensorflow-estimator ×1