Skip to content

dsindex/tensorflow_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tensorflow

description

  • test code for tensorflow
  • tensorflow
    • version : tf 1.0

simple test code

IRIS softmax regression test code

IRIS multi-layer perceptron test code

MNIST softmax regression test code

MNIST multi-layer perceptron test code

  • code
  • distributed version
    $ ./mlp_mnist_dist.sh -v -v
    
    # worker0 log
    job : worker/0 step :  0 ,training accuracy : 0.9
    job : worker/0 step :  100 ,training accuracy : 0.9
    job : worker/0 step :  200 ,training accuracy : 0.86
    job : worker/0 step :  300 ,training accuracy : 0.9
    ...
    
    # worker1 log
    job : worker/1 step :  0 ,training accuracy : 0.12
    job : worker/1 step :  0 ,training accuracy : 0.14
    job : worker/1 step :  300 ,training accuracy : 0.82
    job : worker/1 step :  500 ,training accuracy : 0.92
    job : worker/1 step :  600 ,training accuracy : 0.94
    ....
    • accuracy : 0.9604
    • if you have a trouble like 'failed to connect...', read

MNIST convolutaional neural network test code

MNIST LSTM(recurrent neural network) test code

RNN

word2vec

tensorflow serving

  • setup tensorflow serving
    $ sudo find /usr/lib -name "*protobuf*" -delete
    $ git clone https://github.com/grpc/grpc.git
    $ cd grpc/
    $ git submodule update --init
    $ cd third_party/protobuf
    # install autoconf, libtool (on OS X)
    $ brew install autoconf && brew install libtool
    $ ./autogen.sh
    # if you got an error related to 'libtool' on OS X, edit Makefile to use '/usr/bin/libtool' instead of '/usr/local/bin/libtool'
    $ ./configure; make; sudo make install
    $ cd python
    $ python setup.py build; python setup.py test; sudo python setup.py install --user
    $ cd ../../..
    $ make; sudo make install
    $ which grpc_python_plugin
    $ pip install grpcio --user
  • serving basic

data preprocessing(tf.SequenceExample)

model dump and inference

references