Skip to content

Instantly share code, notes, and snippets.

View qiaohaijun's full-sized avatar
🎯
Focusing

qiao hai-jun qiaohaijun

🎯
Focusing
  • Beijing,China
View GitHub Profile
// 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
@bstaletic
bstaletic / Mutex.h
Created May 25, 2018 18:58
Clang thread safety annotations
#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
@inkydragon
inkydragon / .zshrc
Created August 7, 2017 11:57
zsh的配置文件
# 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
# 主题设置
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'
``` 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"
@yinyin
yinyin / env-autotools.sh
Last active December 4, 2018 23:56
Set environment variables for autotools
#!/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
@sunsided
sunsided / dump_operations.py
Last active October 27, 2021 21:26
Listing operations in frozen .pb TensorFlow graphs in GraphDef format (see comments for SavedModel)
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()
@royling
royling / tmux-iterm2.md
Last active April 24, 2023 19:35
tmux in iTerm2 cheatsheet
@Mistobaan
Mistobaan / TENSORFLOW_DEBUG.md
Last active June 29, 2023 06:32
Tensorflow Internals Debugging Techniques

Machine Setup August 2016

Linux Ubuntu 2016.

  • 1080 GTX
  • SDK 8.0
  • CuDNN 5.1

ENABLE Core dumps

ulimit -c unlimited

需要修改一下/etc/yum.repos.d/epel-7.repo

gpgcheck=0
enabled=1

这两项修改一下

安装服务软件