Skip to content

Instantly share code, notes, and snippets.

View Coderx7's full-sized avatar
💭
In God we Trust!

Seyyed Hossein Hasanpour Coderx7

💭
In God we Trust!
  • IRAN
  • 04:14 (UTC +03:30)
View GitHub Profile
@Coderx7
Coderx7 / maxout_layer
Created May 9, 2016 18:28 — forked from erogol/maxout_layer
maxout layer implementation for caffe library
layers {
name: "conv1A"
type: CONVOLUTION
bottom: "data"
top: "conv1A"
blobs_lr: 1
blobs_lr: 2
weight_decay: 1
weight_decay: 0
convolution_param {
@Coderx7
Coderx7 / Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明.md
Created May 18, 2016 13:54 — forked from bearpaw/Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明.md
Caffe + Ubuntu 12.04 / 14.04 64bit + CUDA 6.5 / 7.0 配置说明

Caffe + Ubuntu 12.04 64bit + CUDA 6.5 配置说明

本步骤能实现用Intel核芯显卡来进行显示, 用NVIDIA GPU进行计算。

1. 安装开发所需的依赖包

安装开发所需要的一些基本包

sudo apt-get install build-essential
sudo apt-get install vim cmake git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev
@Coderx7
Coderx7 / load_jpeg_with_tensorflow.py
Created April 8, 2017 06:20 — forked from eerwitt/load_jpeg_with_tensorflow.py
Example loading multiple JPEG files with TensorFlow and make them available as Tensors with the shape [[R, G, B], ... ].
# Typical setup to include TensorFlow.
import tensorflow as tf
# Make a queue of file names including all the JPEG images files in the relative
# image directory.
filename_queue = tf.train.string_input_producer(
tf.train.match_filenames_once("./images/*.jpg"))
# Read an entire image file which is required since they're JPEGs, if the images
# are too large they could be split in advance to smaller files or use the Fixed
@Coderx7
Coderx7 / caffe_feature_extractor.py
Last active July 22, 2017 17:47 — forked from marekrei/caffe_feature_extractor.py
Caffe feature extractor
#in the name of Allah, the most compassionate the most merciful
#run this scrip under python2. python3 would work, but not prefectly. e.g. running this script and setting oversample to true in
#net.predict([input_image], oversample=True) will cause a crash. but it works just fine under python2.
import numpy as np
import os, sys, getopt
# Main path to your caffe installation
caffe_root = '/path/to/your/caffe/'
# Model prototxt file
@Coderx7
Coderx7 / pycaffe training script.py
Last active March 28, 2018 04:15 — forked from dineshj1/pycaffe training script
Training on Pycaffe
import argparse
import time
start_time=time.time();
################## Argument Parsing #####################################
parser=argparse.ArgumentParser();
parser.add_argument('-s','--solver', default='', type=str); # if empty, solver is created, else read
parser.add_argument('-res', '--resume_from', default='', type=str); #if not empty, resumes training from given file
parser.add_argument('-ft', '--finetune_from', default='', type=str);
@Coderx7
Coderx7 / tsne visualization.py
Created March 28, 2018 04:17 — forked from dineshj1/tsne visualization
t-SNE visualization code
# Dinesh Jayaraman
# Based on code by
# Authors: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Gael Varoquaux
# License: BSD 3 clause (C) INRIA 2011
print(__doc__)
@Coderx7
Coderx7 / live_plot_notebook.py
Last active March 28, 2018 19:07 — forked from wassname/live_plot_notebook.py
Live plot using %matplotlib notebook in jupyter notebook
#برای نمایش بلادرنگ نمودار ترینینگ و تست ما
import numpy as np
from matplotlib import pyplot as plt
class LivePlotNotebook(object):
"""
Live plot using %matplotlib notebook in jupyter notebook
original url : https://gist.github.com/wassname/04e77eb821447705b399e8e7a6d082ce
"""
@Coderx7
Coderx7 / Install NVIDIA Driver and CUDA.md
Created April 11, 2018 19:56 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@Coderx7
Coderx7 / Caffe_Convnet_ConfuxionMatrix.py
Last active November 19, 2018 10:02 — forked from axel-angel/convnet_test.py
Caffe script to compute accuracy and confusion matrix, Added mean subtraction. it now accurately reports the accuracy (just like caffe)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Axel Angel, copyright 2015, license GPLv3.
# added mean subtraction so that, the accuracy can be reported accurately just like caffe when doing a mean subtraction
# Seyyed Hossein Hasan Pour
# Coderx7@Gmail.com
# 7/3/2016
import sys
@Coderx7
Coderx7 / test.c
Created April 20, 2020 07:48 — forked from nad2000/test.c
Basic examples to show how to embed and extend Python in C including: creation of module in C with functions handling and building Python objects; importing and calling python functions from C.
/* Example of embedding Python in another program */
// to compile run:
// gcc -o test $(python-config --cflags) test.c $(python-config --ldflags) && ./test
#include<stdio.h>
#include "Python.h"
void initxyzzy(void); /* Forward */
main(int argc, char **argv)