本文讲解如何使用TensorFlow Severing落地一个训好的模型。
# 从https://github.com/bazelbuild/bazel/releases下载bazel安装包
cd ~/Downloads
chmod +x bazel-0.4.5-installer-linux-x86_64.sh
./bazel-0.4.5-installer-linux-x86_64.sh --user
#!/bin/bash | |
#=============================================================================== | |
# | |
# FILE: getgeo.sh | |
# | |
# USAGE: ./getgeo.sh | |
# | |
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your | |
# database | |
# |
#include <iostream> | |
#include <boost/uuid/uuid.hpp> | |
#include <boost/uuid/uuid_generators.hpp> | |
#include <boost/uuid/uuid_io.hpp> | |
#include <boost/lexical_cast.hpp> | |
#include <boost/range/iterator_range.hpp> |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <ctime> | |
#include <glog/logging.h> | |
#include <msgpack.hpp> | |
#include <pficommon/text/json.h> | |
#include <pficommon/network/socket.h> |
#include <cuda_runtime.h> | |
#include <cstring> | |
#include <cstdlib> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <stdio.h> | |
#include "caffe/caffe.hpp" |
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...
#!/bin/sh | |
# | |
# Script prints gdb stack of the process with a specified pid | |
if [ -z $1 ]; then | |
echo "Usage: $0 pid" | |
exit 1 | |
fi | |
PID=$1 |
#include "v8.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <cxxabi.h> | |
#include <dlfcn.h> | |
using namespace v8; |