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
Namespace(batch_size=10, ignore_label=0, input_size='228, 304', learning_rate=0.00025, model='model_joint4', momentum=0.9, num_classes=4, num_steps=15001, power=0.9, random_mirror=False, random_scale=False, random_seed=1234, restore_model=False, save_num_images=2, save_pred_every=1000, train_list='', weight_decay=0.0005) | |
begin test | |
Model size:3,600,248 | |
Model size:7,209,840 | |
2017-09-16 17:03:50.563408: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. | |
2017-09-16 17:03:50.563431: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. | |
2017-09-16 17:03:50.563439: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed |
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
from PIL import Image | |
import numpy as np | |
import tensorflow as tf | |
def fre_iou(labels, | |
predictions, | |
num_classes, | |
weights=None, | |
metrics_collections=None, |
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 java.lang.reflect.GenericArrayType; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.lang.reflect.TypeVariable; | |
import java.lang.reflect.WildcardType; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class GenericTest<T1,T2 extends Number> { |
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 android.content.Context; | |
import android.os.Debug; | |
import java.io.File; | |
public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
private static final String FILENAME = "out-of-memory.hprof"; | |
public static void install(Context context) { | |
Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |
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
TypedValue typedValue = new TypedValue(); | |
// ((Activity)context).getTheme().resolveAttribute(android.R.attr.textAppearanceLarge, typedValue, true); | |
int[] textSizeAttr = new int[] { android.R.attr.textSize }; | |
int indexOfAttrTextSize = 0; | |
TypedArray a = context.obtainStyledAttributes(typedValue.data, textSizeAttr); | |
int textSize = a.getDimensionPixelSize(indexOfAttrTextSize, -1); | |
a.recycle(); |
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
# 配置自己的源文件目录和源文件后缀名 | |
MY_FILES_PATH := $(LOCAL_PATH) \ | |
$(LOCAL_PATH)/../../Classes | |
MY_FILES_SUFFIX := %.cpp %.c | |
# 递归遍历目录下的所有的文件 | |
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) | |
# 获取相应的源文件 |
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
AAssetDir* assetDir = AAssetManager_openDir(mgr, ""); | |
const char* filename = (const char*)NULL; | |
while ((filename = AAssetDir_getNextFileName(assetDir)) != NULL) { | |
AAsset* asset = AAssetManager_open(mgr, filename, AASSET_MODE_STREAMING); | |
char buf[BUFSIZ]; | |
int nb_read = 0; | |
FILE* out = fopen(filename, "w"); | |
while ((nb_read = AAsset_read(asset, buf, BUFSIZ)) > 0) | |
fwrite(buf, nb_read, 1, out); | |
fclose(out); |
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
/* | |
* SingleTraveralRandom.h | |
* | |
* Created on: 2013年11月25日 | |
* Author: houzhi | |
*/ | |
#ifndef SINGLETRAVERALRANDOM_H_ | |
#define SINGLETRAVERALRANDOM_H_ |
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 java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.ArrayAdapter; |
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
TypedArray array = resources.obtainTypedArray(R.array.share_str); | |
Drawable drawable = array.getDrawable(0); | |
NewerOlder