Skip to content
Permalink
Browse files

Normalize the line ending to LF. (#539)

  • Loading branch information...
linmajia authored and rainLiuplus committed Dec 28, 2018
1 parent 70a52a8 commit 9489bbc1329bd24a2d35f022236d317fb66b43f6
Showing with 1,528 additions and 1,528 deletions.
  1. +43 −43 docs/client.py
  2. +3 −3 mmdnn/conversion/__init__.py
  3. +2 −2 mmdnn/conversion/_script/__init__.py
  4. +2 −2 mmdnn/conversion/caffe/__init__.py
  5. +451 −451 mmdnn/conversion/caffe/graph.py
  6. +3 −3 mmdnn/conversion/cntk/__init__.py
  7. +85 −85 mmdnn/conversion/common/DataStructure/emitter.py
  8. +242 −242 mmdnn/conversion/common/utils.py
  9. +3 −3 mmdnn/conversion/coreml/__init__.py
  10. +33 −33 mmdnn/conversion/coreml/coreml_utils.py
  11. +3 −3 mmdnn/conversion/darknet/__init__.py
  12. +3 −3 mmdnn/conversion/examples/darknet/__init__.py
  13. +3 −3 mmdnn/conversion/examples/keras/__init__.py
  14. +80 −80 mmdnn/conversion/examples/keras/extract_model.py
  15. +132 −132 mmdnn/conversion/examples/mxnet/extract_model.py
  16. +81 −81 mmdnn/conversion/examples/mxnet/imagenet_test.py
  17. +3 −3 mmdnn/conversion/examples/onnx/__init__.py
  18. +3 −3 mmdnn/conversion/examples/paddle/__init__.py
  19. +3 −3 mmdnn/conversion/examples/paddle/models/__init__.py
  20. +71 −71 mmdnn/conversion/examples/pytorch/extract_model.py
  21. +3 −3 mmdnn/conversion/examples/tensorflow/__init__.py
  22. +103 −103 mmdnn/conversion/examples/tensorflow/extract_model.py
  23. +3 −3 mmdnn/conversion/examples/tensorflow/models/__init__.py
  24. +3 −3 mmdnn/conversion/examples/tensorflow/models/mobilenet/__init__.py
  25. +3 −3 mmdnn/conversion/mxnet/__init__.py
  26. +96 −96 mmdnn/conversion/mxnet/mxnet_graph.py
  27. +3 −3 mmdnn/conversion/paddle/__init__.py
  28. +3 −3 mmdnn/conversion/pytorch/__init__.py
  29. +59 −59 mmdnn/conversion/pytorch/torch_to_np.py
  30. +3 −3 mmdnn/conversion/torch/__init__.py
@@ -1,43 +1,43 @@
'''
Send JPEG image to tensorflow_model_server loaded with GAN model.
Hint: the code has been compiled together with TensorFlow serving
and not locally. The client is called in the TensorFlow Docker container
'''

from __future__ import print_function

# Communication to TensorFlow server via gRPC
from grpc.beta import implementations
import tensorflow as tf

# TensorFlow serving stuff to send messages
from tensorflow_serving.apis import predict_pb2
from tensorflow_serving.apis import prediction_service_pb2


# Command line arguments
tf.app.flags.DEFINE_string('server', 'localhost:9000',
'PredictionService host:port')
tf.app.flags.DEFINE_string('image', '', 'path to image in JPEG format')
FLAGS = tf.app.flags.FLAGS


def main(_):
host, port = FLAGS.server.split(':')
channel = implementations.insecure_channel(host, int(port))
stub = prediction_service_pb2.beta_create_PredictionService_stub(channel)
# Send request
image = tf.gfile.FastGFile(FLAGS.image, 'rb').read()
request = predict_pb2.PredictRequest()
request.model_spec.name = 'tensorflow-serving'
request.model_spec.signature_name = tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY
request.inputs['image'].CopyFrom(tf.contrib.util.make_tensor_proto(image))
#request.inputs['input'].CopyFrom()

result = stub.Predict(request, 10.0) # 10 secs timeout
print(result)


if __name__ == '__main__':
tf.app.run()
'''
Send JPEG image to tensorflow_model_server loaded with GAN model.
Hint: the code has been compiled together with TensorFlow serving
and not locally. The client is called in the TensorFlow Docker container
'''

from __future__ import print_function

# Communication to TensorFlow server via gRPC
from grpc.beta import implementations
import tensorflow as tf

# TensorFlow serving stuff to send messages
from tensorflow_serving.apis import predict_pb2
from tensorflow_serving.apis import prediction_service_pb2


# Command line arguments
tf.app.flags.DEFINE_string('server', 'localhost:9000',
'PredictionService host:port')
tf.app.flags.DEFINE_string('image', '', 'path to image in JPEG format')
FLAGS = tf.app.flags.FLAGS


def main(_):
host, port = FLAGS.server.split(':')
channel = implementations.insecure_channel(host, int(port))
stub = prediction_service_pb2.beta_create_PredictionService_stub(channel)
# Send request
image = tf.gfile.FastGFile(FLAGS.image, 'rb').read()
request = predict_pb2.PredictRequest()
request.model_spec.name = 'tensorflow-serving'
request.model_spec.signature_name = tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY
request.inputs['image'].CopyFrom(tf.contrib.util.make_tensor_proto(image))
#request.inputs['input'].CopyFrom()

result = stub.Predict(request, 10.0) # 10 secs timeout
print(result)


if __name__ == '__main__':
tf.app.run()
@@ -1,3 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
@@ -1,3 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
@@ -1,3 +1,3 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
Oops, something went wrong.

0 comments on commit 9489bbc

Please sign in to comment.
You can’t perform that action at this time.