[PYTHON] I tried deep learning

View with Caffe

What is Caffe? A deep learning open source library implemented in C ++. Developed mainly by BVLC, a research center at the University of California, Berkeley, and available in C ++, Python, and MATLAB.

Other libraries include:

Library Contents
Torch7 New York University
Cuda-convert Toronto University
Chainer Preferred Networks
TensorFlow Google

For the time being, set aside the others and install what you need for caffe

brew install --fresh -vd snappy leveldb gflags glog szip lmdb  
brew install hdf5 opencv
brew install --build-from-source --with-python --fresh -vd protobuf
brew install --build-from-source --fresh -vd boost boost-python
brew install openblas

#You may have to do the following as needed
sudo xcodebuild -license
brew tap homebrew/science
Library Contents
lmdb key-value type data store
hdf5 file format
opencv Image processing library
protobuf A library for defining structures in the interface definition language
boost-python C++A library to easily write Python modules that wrap classes and functions in
openblas Fast BLAS

Download Caffe

git clone https://github.com/BVLC/caffe.git
cd caffe

cp Makefile.config.example Makefile.config
vim Makefile.config

Modify config file

  1. Change BLAS: = atlas to BLAS: = open
  2. Uncomment the following (#)

Makefile.config


`# CPU_ONLY := 1`
`# BLAS_INCLUDE := $(shell brew --prefix openblas)/include`
`# BLAS_LIB := $(shell brew --prefix openblas)/lib`

When you download it, a caffe folder is created, so go there and go

make clean
make all -j4
make test -j4
make runtest

cd python/
for li in $(cat requirements.txt); do sudo pip install $li; done

cd ../
make pycaffe

It doesn't work ...

CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:10:10: fatal error: 'numpy/arrayobject.h' file not found
#include <numpy/arrayobject.h>
        ^
1 error generated.
make: *** [python/caffe/_caffe.so] Error 1

I'm not sure, so switch to TensorFlow! Continued below

Try deep learning with TensorFlow http://qiita.com/northriver/items/17e936343110d392cce8

Recommended Posts

I tried deep learning
I tried deep learning using Theano
Deep Learning
[Deep Learning from scratch] I tried to explain Dropout
I tried to implement Deep VQE
I tried machine learning with liblinear
I tried reinforcement learning using PyBrain
I tried learning LightGBM with Yellowbrick
I tried scraping
I tried PyQ
Deep Learning Memorandum
Start Deep learning
I tried hosting a TensorFlow deep learning model using TensorFlow Serving
I tried AutoKeras
Python Deep Learning
I tried papermill
Deep learning × Python
I tried django-slack
I tried Django
I tried to implement Perceptron Part 1 [Deep Learning from scratch]
I tried spleeter
I tried cgo
I tried to divide with a deep learning language model
I tried learning with Kaggle's Titanic (kaggle②)
[Kaggle] I tried ensemble learning using LightGBM
Mayungo's Python Learning Episode 8: I tried input
I tried to make deep learning scalable with Spark × Keras × Docker
I tried deep reinforcement learning (Double DQN) for tic-tac-toe with ChainerRL
I tried using parameterized
I tried using argparse
First Deep Learning ~ Struggle ~
I tried using mimesis
I tried using anytree
I tried competitive programming
I tried to implement deep learning that is not deep with only NumPy
I tried running pymc
Python: Deep Learning Practices
I tried ARP spoofing
Deep learning / activation functions
Deep Learning from scratch
An amateur tried Deep Learning using Caffe (Practice)
I tried using aiomysql
I tried Python> autopep8
[Deep Learning from scratch] I tried to implement sigmoid layer and Relu layer.
I tried using coturn
Deep learning / cross entropy
I tried using Pipenv
First Deep Learning ~ Preparation ~
I tried using matplotlib
I tried using "Anvil".
I tried using Hubot
I tried using ESPCN
I tried PyCaret2.0 (pycaret-nightly)
[AI] Deep Metric Learning
I tried using openpyxl
I tried AWS CDK!
I tried using Ipython
I tried to debug.
I tried using PyCaret
I tried using cron
I tried using the trained model VGG16 of the deep learning library Keras