Skip to content

Commit 2ee40cb

Browse files
Caffe updated to Aug20 version
1 parent f83a6bb commit 2ee40cb

File tree

8 files changed

+66
-39
lines changed

8 files changed

+66
-39
lines changed

3rdparty/Versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Unix:
22
- Caffe:
3-
- Version 1.0.0, extracted from GitHub on 07/19/2017 from the current master branch.
3+
- Version 1.0.0, extracted from GitHub on 08/20/2017 from the current master branch.
44
- Link: https://github.com/BVLC/caffe
55

66
Windows:

3rdparty/caffe/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and step-by-step examples.
1717

1818
## Custom distributions
1919

20-
- [Intel Caffe](https://github.com/BVLC/caffe/tree/intel) (Optimized for CPU and support for multi-node), in particular Xeon processors (HSW, BDW, Xeon Phi).
20+
- [Intel Caffe](https://github.com/BVLC/caffe/tree/intel) (Optimized for CPU and support for multi-node), in particular Xeon processors (HSW, BDW, SKX, Xeon Phi).
2121
- [OpenCL Caffe](https://github.com/BVLC/caffe/tree/opencl) e.g. for AMD or Intel devices.
2222
- [Windows Caffe](https://github.com/BVLC/caffe/tree/windows)
2323

3rdparty/caffe/cmake/Modules/FindvecLib.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ endif()
1212

1313
set(__veclib_include_suffix "Frameworks/vecLib.framework/Versions/Current/Headers")
1414

15+
exec_program(xcode-select ARGS -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR)
1516
find_path(vecLib_INCLUDE_DIR vecLib.h
1617
DOC "vecLib include directory"
1718
PATHS /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix}
1819
/System/Library/${__veclib_include_suffix}
19-
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
20+
${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
2021
NO_DEFAULT_PATH)
2122

2223
include(FindPackageHandleStandardArgs)

3rdparty/caffe/docs/install_apt.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,38 @@ title: "Installation: Ubuntu"
44

55
# Ubuntu Installation
66

7+
### For Ubuntu (>= 17.04)
8+
9+
**Installing pre-compiled Caffe**
10+
11+
Everything including caffe itself is packaged in 17.04 and higher versions.
12+
To install pre-compiled Caffe package, just do it by
13+
14+
sudo apt install caffe-cpu
15+
16+
for CPU-only version, or
17+
18+
sudo apt install caffe-cuda
19+
20+
for CUDA version. Note, the cuda version may break if your NVIDIA driver
21+
and CUDA toolkit are not installed by APT.
22+
23+
[Package status of CPU-only version](https://launchpad.net/ubuntu/+source/caffe)
24+
25+
[Package status of CUDA version](https://launchpad.net/ubuntu/+source/caffe-contrib)
26+
27+
**Installing Caffe from source**
28+
29+
We may install the dependencies by merely one line
30+
31+
sudo apt build-dep caffe-cpu # dependencies for CPU-only version
32+
sudo apt build-dep caffe-cuda # dependencies for CUDA version
33+
34+
It requires a `deb-src` line in your `sources.list`.
35+
Continue with [compilation](installation.html#compilation).
36+
37+
### For Ubuntu (\< 17.04)
38+
739
**General dependencies**
840

941
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler

3rdparty/caffe/docs/install_apt_debian.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,28 @@ Caffe packages are available for several Debian versions, as shown in the
88
following chart:
99

1010
```
11-
Your Distro | CPU_ONLY | CUDA | Alias
11+
Your Distro | CPU_ONLY | CUDA | Codename
1212
----------------+------------+--------+-------------------
13-
Debian/stable | ✘ | ✘ | Debian Jessie
14-
Debian/testing | ✔ | ✔ | Debian Stretch/Sid
15-
Debian/unstable | ✔ | ✔ | Debian Sid
13+
Debian/oldstable| ✘ | ✘ | Jessie (8.0)
14+
Debian/stable | ✔ | ✔ | Stretch (9.0)
15+
Debian/testing | ✔ | ✔ | Buster
16+
Debian/unstable | ✔ | ✔ | Buster
1617
```
1718

1819
* `` You should take a look at [Ubuntu installation instruction](install_apt.html).
1920

2021
* `` You can install caffe with a single command line following this guide.
2122

22-
Last update: 2017-02-01
23+
* [Package status of CPU-only version](https://tracker.debian.org/pkg/caffe)
24+
25+
* [Package status of CUDA version](https://tracker.debian.org/pkg/caffe-contrib)
26+
27+
Last update: 2017-07-08
2328

2429
## Binary installation with APT
2530

26-
Apart from the installation methods based on source, Debian/unstable
27-
and Debian/testing users can install pre-compiled Caffe packages from
28-
the official archive.
31+
Apart from the installation methods based on source, Debian users can install
32+
pre-compiled Caffe packages from the official archive with APT.
2933

3034
Make sure that your `/etc/apt/sources.list` contains `contrib` and `non-free`
3135
sections if you want to install the CUDA version, for instance:
@@ -44,7 +48,8 @@ $ caffe # command line interface wo
4448
$ python3 -c 'import caffe; print(caffe.__path__)' # python3 interface working
4549
```
4650

47-
These Caffe packages should work for you out of box.
51+
These Caffe packages should work for you out of box. However, the CUDA version
52+
may break if your NVIDIA driver and CUDA toolkit are not installed with APT.
4853

4954
#### Customizing caffe packages
5055

@@ -96,18 +101,22 @@ Note, this requires a `deb-src` entry in your `/etc/apt/sources.list`.
96101
Some users may find their favorate compiler doesn't work with CUDA.
97102

98103
```
99-
CXX compiler | CUDA 7.5 | CUDA 8.0 |
100-
-------------+------------+------------+-
101-
GCC-7 | ? | ? |
102-
GCC-6 | ✘ | ✘ |
103-
GCC-5 | ✔ [1] | ✔ |
104-
CLANG-4.0 | ? | ? |
105-
CLANG-3.9 | ✘ | ✘ |
106-
CLANG-3.8 | ? | ✔ |
104+
CXX compiler | CUDA 7.5 | CUDA 8.0 | CUDA 9.0 |
105+
-------------+------------+------------+------------+
106+
GCC-8 | ? | ? | ? |
107+
GCC-7 | ? | ? | ? |
108+
GCC-6 | ✘ | ✘ | ✔ |
109+
GCC-5 | ✔ [1] | ✔ | ✔ |
110+
-------------+------------+------------+------------+
111+
CLANG-4.0 | ? | ? | ? |
112+
CLANG-3.9 | ✘ | ✘ | ✔ |
113+
CLANG-3.8 | ? | ✔ | ✔ |
107114
```
108115

109116
`[1]` CUDA 7.5 's `host_config.h` must be patched before working with GCC-5.
110117

118+
`[2]` CUDA 9.0: https://devblogs.nvidia.com/parallelforall/cuda-9-features-revealed/
119+
111120
BTW, please forget the GCC-4.X series, since its `libstdc++` ABI is not compatible with GCC-5's.
112121
You may encounter failure linking GCC-4.X object files against GCC-5 libraries.
113122
(See https://wiki.debian.org/GCC5 )
@@ -152,10 +161,3 @@ and hack the packaging scripts, then build your customized package.
152161
$ sudo apt install caffe-doc
153162
$ dpkg -L caffe-doc
154163
```
155-
156-
* Where can I find the Debian package status?
157-
158-
```
159-
https://tracker.debian.org/pkg/caffe (for the CPU_ONLY version)
160-
https://tracker.debian.org/pkg/caffe-contrib (for the CUDA version)
161-
```

3rdparty/caffe/docs/tutorial/layers/lrn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: Local Response Normalization (LRN)
1414
- `local_size` [default 5]: the number of channels to sum over (for cross channel LRN) or the side length of the square region to sum over (for within channel LRN)
1515
- `alpha` [default 1]: the scaling parameter (see below)
1616
- `beta` [default 5]: the exponent (see below)
17-
- `norm_region` [default `ACROSS_CHANNELS`]: whether to sum over adjacent channels (`ACROSS_CHANNELS`) or nearby spatial locaitons (`WITHIN_CHANNEL`)
17+
- `norm_region` [default `ACROSS_CHANNELS`]: whether to sum over adjacent channels (`ACROSS_CHANNELS`) or nearby spatial locations (`WITHIN_CHANNEL`)
1818

1919
The local response normalization layer performs a kind of "lateral inhibition" by normalizing over local input regions. In `ACROSS_CHANNELS` mode, the local regions extend across nearby channels, but have no spatial extent (i.e., they have shape `local_size x 1 x 1`). In `WITHIN_CHANNEL` mode, the local regions extend spatially, but are in separate channels (i.e., they have shape `1 x local_size x local_size`). Each input value is divided by $$(1 + (\alpha/n) \sum_i x_i^2)^\beta$$, where $$n$$ is the size of each local region, and the sum is taken over the region centered at that value (zero padding is added where necessary).
2020

3rdparty/caffe/examples/brewing-logreg.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@
7373
")\n",
7474
"\n",
7575
"# Split into train and test\n",
76-
"X, Xt, y, yt = sklearn.cross_validation.train_test_split(X, y)\n",
76+
"X, Xt, y, yt = sklearn.model_selection.train_test_split(X, y)\n",
7777
"\n",
7878
"# Visualize sample of the data\n",
7979
"ind = np.random.permutation(X.shape[0])[:1000]\n",
8080
"df = pd.DataFrame(X[ind])\n",
81-
"_ = pd.scatter_matrix(df, figsize=(9, 9), diagonal='kde', marker='o', s=40, alpha=.4, c=y[ind])"
81+
"_ = pd.plotting.scatter_matrix(df, figsize=(9, 9), diagonal='kde', marker='o', s=40, alpha=.4, c=y[ind])"
8282
]
8383
},
8484
{
@@ -111,7 +111,7 @@
111111
"%%timeit\n",
112112
"# Train and test the scikit-learn SGD logistic regression.\n",
113113
"clf = sklearn.linear_model.SGDClassifier(\n",
114-
" loss='log', n_iter=1000, penalty='l2', alpha=5e-4, class_weight='auto')\n",
114+
" loss='log', n_iter=1000, penalty='l2', alpha=5e-4, class_weight='balanced')\n",
115115
"\n",
116116
"clf.fit(X, y)\n",
117117
"yt_pred = clf.predict(Xt)\n",
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +0,0 @@
1-
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
2-
from ._caffe import init_log, log, set_mode_cpu, set_mode_gpu, set_device, Layer, get_solver, layer_type_list, set_random_seed, solver_count, set_solver_count, solver_rank, set_solver_rank, set_multiprocess, has_nccl
3-
from ._caffe import __version__
4-
from .proto.caffe_pb2 import TRAIN, TEST
5-
from .classifier import Classifier
6-
from .detector import Detector
7-
from . import io
8-
from .net_spec import layers, params, NetSpec, to_proto

0 commit comments

Comments
 (0)