-
Notifications
You must be signed in to change notification settings - Fork 121
/
3-make-clean-copy.bash
executable file
·53 lines (38 loc) · 1.55 KB
/
3-make-clean-copy.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash -
set -e
set -x
source ./config/params
# http://redcatlabs.com/downloads/deep-learning-workshop/LICENSE
RCL_BASE=http://redcatlabs.com/downloads/deep-learning-workshop/notebooks/data
rm -rf ./clean
mkdir -p ./clean
rsync -avz --progress \
--exclude=".git/" --exclude=".geany/" \
--exclude="__pycache__/" --exclude=".ipynb_checkpoints/" \
--exclude="data/" --exclude="cache/" \
--include="*/" --include="*.ipynb" \
--exclude="*" \
./notebooks ./clean/
rm ./clean/notebooks/all-in-one.ipynb
rsync -avz --progress \
./notebooks/images ./clean/notebooks/
rsync -avz --progress \
--exclude=".git/" \
--exclude="__pycache__/" --exclude=".ipynb_checkpoints/" \
--exclude="syntaxnet/" \
./notebooks/models ./clean/notebooks/
rsync -avz --progress \
./notebooks/images ./clean/notebooks/
# Link up the images directories
ln -s ../../images ./clean/notebooks/2-CNN/5-TransferLearning/
rsync -avz --progress \
./presentation ./clean/
# Link the presentation image directory into the tree too (already there)
#ln -s ../../presentation/reveal.js-2.6.2/img ./clean/notebooks/images/presentation
# Temporary clean-out
rm ./clean/notebooks/2-CNN/8-Speech/SpeechAnalysis_*
# Copy over the locally installed keras zoo model parameters
mkdir -p ./clean/.keras/models
rsync -avz --progress ~/.keras/models/imagenet_class_index.json ./clean/.keras/models/
rsync -avz --progress ~/.keras/models/nasnet_mobile.h5 ./clean/.keras/models/
rsync -avz --progress ~/.keras/models/nasnet_mobile_no_top.h5 ./clean/.keras/models/