This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os | |
import sys | |
from typing import Iterable | |
import tensorflow as tf | |
parser = argparse.ArgumentParser() | |
parser.add_argument('file', type=str, help='The file name of the frozen graph.') | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source ~/bin/env-autotools.sh | |
OPT_BASE=/opt | |
which autoreconf | |
if [ "$?" != "0" ]; then | |
export PATH=${OPT_BASE}/autoconf-2.69/bin:$PATH | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` bash | |
[@nmyjs_176_98 web.web_dnn.20170601.a.qhj_desm]# svn diff http://svn.sogou-inc.com/svn/websearch4/web/web_dnn/branches/desm2opt http://svn.sogou-inc.com/svn/websearch4/web/web_dnn/trunk | |
Authentication realm: <http://svn.sogou-inc.com:80> Sogou SVN | |
Password for 'qiaohaijun': | |
Index: src/gpu_server.cfg | |
=================================================================== | |
--- src/gpu_server.cfg (.../branches/desm2opt) (revision 593977) | |
+++ src/gpu_server.cfg (.../trunk) (revision 593977) | |
@@ -10,7 +10,6 @@ | |
"DnnModelPath"="data/base/dnn.model" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bazel run tensorflow/tools/graph_transforms:transform_graph -- \ | |
--in_graph=tensorflow_inception_graph.pb \ | |
--out_graph=optimized_inception_graph.pb --inputs='Mul' \ | |
--outputs='softmax' --transforms='strip_unused_nodes(type=float, shape="1,299,299,3") fold_constants(ignore_errors=true) fold_batch_norms fold_old_batch_norms' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/home/wo/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
# 主题设置 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BENCHMARK_MUTEX_H_ | |
#define BENCHMARK_MUTEX_H_ | |
#include <mutex> | |
// Enable thread safety attributes only with clang. | |
// The attributes can be safely erased when compiling with other compilers. | |
#if defined(__clang__) && (!defined(SWIG)) | |
#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) | |
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.zhihu.com/question/33084689/answer/58994758 | |
#include <stdio.h> | |
#include <string.h> | |
typedef struct inst | |
{ | |
unsigned char code; // 指令 | |
unsigned char cond; // 执行该指令的条件 | |
short p1, p2; // 参数1、2 |
OlderNewer