This file contains hidden or 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 MYLMDB_H | |
#define MYLMDB_H | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/stat.h> // mkdir | |
#include <string> |
This file contains hidden or 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 MYREC_H | |
#define MYREC_H | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <string> | |
#include <vector> |
This file contains hidden or 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
using namespace ncnn; | |
class TaskQueue | |
{ | |
public: | |
TaskQueue() | |
{ | |
} |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
/*! | |
* Copyright (c) 2019 by Contributors | |
* \file op.h | |
* \brief definition of all the operators | |
* \author Chuntao Hong, Xin Li | |
*/ | |
#ifndef MXNET_CPP_OP_H_ | |
#define MXNET_CPP_OP_H_ |
This file contains hidden or 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
#include <opencv2/core/core.hpp> | |
static cv::Mat get_affine_transform(const cv::Point2f* a, const cv::Point2f* b, int count) | |
{ | |
double sa[4][4]={{0.}}; | |
double sb[4]={0.}; | |
double m[4]; | |
cv::Mat A( 4, 4, CV_64F, sa ); | |
cv::Mat B( 4, 1, CV_64F, sb ); | |
cv::Mat MM( 4, 1, CV_64F, m ); |
This file contains hidden or 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
# 256x256 | |
data = batch.data[0].as_in_context(ctx) | |
# random crop resize to 224x224 | |
data_elems = nd.split(data, num_outputs=batch_size, axis=0) | |
for b in range(batch_size): | |
xy0 = random.randint(0, 32) | |
xy1 = random.randint(256-32, 256) | |
cropped = nd.slice(data_elems[b], begin=(None,None,xy0,xy0), end=(None,None,xy1,xy1)) |
This file contains hidden or 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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
This file contains hidden or 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
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
This file contains hidden or 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/sh | |
# Use socat to proxy git through an HTTP CONNECT firewall. | |
# Useful if you are trying to clone git:// from inside a company. | |
# Requires that the proxy allows CONNECT to port 9418. | |
# | |
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run | |
# chmod +x gitproxy | |
# git config --global core.gitproxy gitproxy | |
# | |
# More details at http://tinyurl.com/8xvpny |
This file contains hidden or 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
$ ./benchmark/benchncnn | |
thread_policy_set error 46 | |
loop_count = 4 | |
num_threads = 8 | |
powersave = 0 | |
gpu_device = -1 | |
cooling_down = 1 | |
squeezenet min = 5.64 max = 6.24 avg = 5.88 | |
squeezenet_int8 min = 8.93 max = 8.97 avg = 8.94 | |
mobilenet min = 8.86 max = 8.99 avg = 8.91 |
OlderNewer