Skip to content

Instantly share code, notes, and snippets.

View mlzxy's full-sized avatar

Xinyu Zhang mlzxy

View GitHub Profile
$(exec 2>/dev/null;cd -- $(dirname "$0"); unset PWD; /usr/bin/pwd || /bin/pwd || pwd)
@mlzxy
mlzxy / openclFPGAListOfDevices.md
Last active October 10, 2016 22:43
available xilinx sdaccel devices
****** xbinst v2016.2
  **** Copyright 1986-2016 Xilinx, Inc. All Rights Reserved.

ERROR: [XBINST 60-705] No device was found that matches 'sdf'. The supported devices are:
xilinx:adm-pcie-ku3:2ddr:3.1
xilinx:adm-pcie-ku3:2ddr:3.0
xilinx:adm-pcie-ku3:1ddr:3.0
xilinx:zc706:uart:1.0
xilinx:tul-pcie3-ku115:2ddr:3.0
@mlzxy
mlzxy / install_opencv2.4.9.sh
Last active September 29, 2016 22:15 — forked from HuangFJ/install_opencv2.4.9.sh
centos 6.5 + opencv 2.4.9 + ffmpeg 0.10.11 + python 2.7.7 自动安装脚本
#! /bin/bash
sudo yum install -y gcc g++ gtk+-devel libjpeg-devel libtiff-devel jasper-devel libpng-devel zlib-devel cmake unzip sqlite-devel readline-devel bzip2-devel openssl-devel ncurses-devel
sudo yum install -y yum-priorities
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo yum install -y eigen3-devel --enablerepo=epel
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm'
sudo yum install -y ffmpeg-devel
export PYTHON_PREFIX=/usr/local/python-2.7.7
#include <algorithm>
#include <vector>
#include "caffe/filler.hpp"
#include "caffe/layers/base_conv_layer.hpp"
#include "caffe/util/im2col.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
#include <boost/math/special_functions/next.hpp>
#include <boost/random.hpp>
#include <limits>
#include "caffe/common.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/util/rng.hpp"
namespace caffe {
#include <vector>
#include "caffe/layers/deconv_layer.hpp"
namespace caffe {
template <typename Dtype>
void DeconvolutionLayer<Dtype>::compute_output_shape() {
const int* kernel_shape_data = this->kernel_shape_.cpu_data();
const int* stride_data = this->stride_.cpu_data();
function result = conv2d_by_partial_sum_grid(image, filter)
[is1, is2] = size(image);
[fs1, fs2] = size(filter);
r1 = is1-(fs1-1);
r2 = is2-(fs2-1);
result = zeros(r1, r2);
psum_result = cell(is1, fs1);
for ir = 1:is1
for fr = 1:fs1
irow = image(ir,:);
@mlzxy
mlzxy / mediaserver.js
Last active June 3, 2020 17:36
Node.js Static File + Media Streaming Server
/**
* 1. install nodejs from https://nodejs.org/en/download/
* 2. run `npm install -g serve-static filehandler serve-index` in terminal
* 3. run `node mediaserver.js`
*/
var http = require('http'),
fs = require('fs'),
util = require('util'),
url = require('url'),
path = require('path'),
@mlzxy
mlzxy / caffe_error_solutions.md
Created May 24, 2016 09:32 — forked from Coldmooon/caffe_error_solutions.md
Caffe 安装错误记录及解决办法

Caffe 安装错误记录及解决办法

以后在博客里更新: http://coldmooon.github.io/

1)Fatal error : 'tr1/tuple' file not found

出现该问题有两种情况,可以先尝试下面的链接: BVLC/caffe#1358 如果不行,那说明是 Makefile 文件除了问题。一般来说,按照 BVLC/caffe#1740

name: "ResNet-152"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
layer {
bottom: "data"
top: "conv1"