100% found this document useful (4 votes)
272 views

MATLAB Deep Learning Toolbox User s Guide The Mathworks download

The document is a user guide for the MATLAB Deep Learning Toolbox, detailing its features, functionalities, and how to utilize deep learning in MATLAB. It covers topics such as training classifiers, using pretrained networks, and implementing deep learning with big data. Additionally, it provides links to other MATLAB toolbox user guides and contact information for MathWorks support.

Uploaded by

bucekwiglelu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
272 views

MATLAB Deep Learning Toolbox User s Guide The Mathworks download

The document is a user guide for the MATLAB Deep Learning Toolbox, detailing its features, functionalities, and how to utilize deep learning in MATLAB. It covers topics such as training classifiers, using pretrained networks, and implementing deep learning with big data. Additionally, it provides links to other MATLAB toolbox user guides and contact information for MathWorks support.

Uploaded by

bucekwiglelu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

MATLAB Deep Learning Toolbox User s Guide The

Mathworks pdf download

https://textbookfull.com/product/matlab-deep-learning-toolbox-
user-s-guide-the-mathworks/

Download more ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

MATLAB Econometrics Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-econometrics-toolbox-
user-s-guide-the-mathworks/

MATLAB Bioinformatics Toolbox User s Guide The


Mathworks

https://textbookfull.com/product/matlab-bioinformatics-toolbox-
user-s-guide-the-mathworks/

MATLAB Mapping Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-mapping-toolbox-user-s-
guide-the-mathworks/

MATLAB Optimization Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-optimization-toolbox-
user-s-guide-the-mathworks/
MATLAB Trading Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-trading-toolbox-user-s-
guide-the-mathworks/

MATLAB Computer Vision Toolbox User s Guide The


Mathworks

https://textbookfull.com/product/matlab-computer-vision-toolbox-
user-s-guide-the-mathworks/

MATLAB Curve Fitting Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-curve-fitting-toolbox-
user-s-guide-the-mathworks/

MATLAB Fuzzy Logic Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-fuzzy-logic-toolbox-user-
s-guide-the-mathworks/

MATLAB Global Optimization Toolbox User s Guide The


Mathworks

https://textbookfull.com/product/matlab-global-optimization-
toolbox-user-s-guide-the-mathworks/
Deep Learning Toolbox™
User's Guide

Mark Hudson Beale


Martin T. Hagan
Howard B. Demuth

R2020a
How to Contact MathWorks

Latest news: www.mathworks.com

Sales and services: www.mathworks.com/sales_and_services

User community: www.mathworks.com/matlabcentral

Technical support: www.mathworks.com/support/contact_us

Phone: 508-647-7000

The MathWorks, Inc.


1 Apple Hill Drive
Natick, MA 01760-2098
Deep Learning Toolbox™ User's Guide
© COPYRIGHT 1992–2020 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied
only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form
without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through
the federal government of the United States. By accepting delivery of the Program or Documentation, the government
hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer
software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014.
Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain
to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government) and shall
supersede any conflicting contractual terms or conditions. If this License fails to meet the government's needs or is
inconsistent in any respect with federal procurement law, the government agrees to return the Program and
Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be
trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for
more information.
Revision History
June 1992 First printing
April 1993 Second printing
January 1997 Third printing
July 1997 Fourth printing
January 1998 Fifth printing Revised for Version 3 (Release 11)
September 2000 Sixth printing Revised for Version 4 (Release 12)
June 2001 Seventh printing Minor revisions (Release 12.1)
July 2002 Online only Minor revisions (Release 13)
January 2003 Online only Minor revisions (Release 13SP1)
June 2004 Online only Revised for Version 4.0.3 (Release 14)
October 2004 Online only Revised for Version 4.0.4 (Release 14SP1)
October 2004 Eighth printing Revised for Version 4.0.4
March 2005 Online only Revised for Version 4.0.5 (Release 14SP2)
March 2006 Online only Revised for Version 5.0 (Release 2006a)
September 2006 Ninth printing Minor revisions (Release 2006b)
March 2007 Online only Minor revisions (Release 2007a)
September 2007 Online only Revised for Version 5.1 (Release 2007b)
March 2008 Online only Revised for Version 6.0 (Release 2008a)
October 2008 Online only Revised for Version 6.0.1 (Release 2008b)
March 2009 Online only Revised for Version 6.0.2 (Release 2009a)
September 2009 Online only Revised for Version 6.0.3 (Release 2009b)
March 2010 Online only Revised for Version 6.0.4 (Release 2010a)
September 2010 Online only Revised for Version 7.0 (Release 2010b)
April 2011 Online only Revised for Version 7.0.1 (Release 2011a)
September 2011 Online only Revised for Version 7.0.2 (Release 2011b)
March 2012 Online only Revised for Version 7.0.3 (Release 2012a)
September 2012 Online only Revised for Version 8.0 (Release 2012b)
March 2013 Online only Revised for Version 8.0.1 (Release 2013a)
September 2013 Online only Revised for Version 8.1 (Release 2013b)
March 2014 Online only Revised for Version 8.2 (Release 2014a)
October 2014 Online only Revised for Version 8.2.1 (Release 2014b)
March 2015 Online only Revised for Version 8.3 (Release 2015a)
September 2015 Online only Revised for Version 8.4 (Release 2015b)
March 2016 Online only Revised for Version 9.0 (Release 2016a)
September 2016 Online only Revised for Version 9.1 (Release 2016b)
March 2017 Online only Revised for Version 10.0 (Release 2017a)
September 2017 Online only Revised for Version 11.0 (Release 2017b)
March 2018 Online only Revised for Version 11.1 (Release 2018a)
September 2018 Online only Revised for Version 12.0 (Release 2018b)
March 2019 Online only Revised for Version 12.1 (Release 2019a)
September 2019 Online only Revised for Version 13 (Release 2019b)
March 2020 Online only Revised for Version 14 (Release 2020a)
Contents

Deep Networks
1
Deep Learning in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
What Is Deep Learning? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Try Deep Learning in 10 Lines of MATLAB Code . . . . . . . . . . . . . . . . . . . . 1-4
Start Deep Learning Faster Using Transfer Learning . . . . . . . . . . . . . . . . 1-5
Train Classifiers Using Features Extracted from Pretrained Networks . . . 1-6
Deep Learning with Big Data on CPUs, GPUs, in Parallel, and on the Cloud
...................................................... 1-6

Deep Learning with Big Data on GPUs and in Parallel . . . . . . . . . . . . . . . . 1-8


Training with Multiple GPUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Deep Learning in the Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Fetch and Preprocess Data in Background . . . . . . . . . . . . . . . . . . . . . . . 1-10

Pretrained Deep Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12


Compare Pretrained Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Load Pretrained Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Feature Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
Transfer Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
Import and Export Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16

Learn About Convolutional Neural Networks . . . . . . . . . . . . . . . . . . . . . . 1-19

Multiple-Input and Multiple-Output Networks . . . . . . . . . . . . . . . . . . . . . 1-21


Multiple-Input Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Multiple-Output Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21

List of Deep Learning Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23


Deep Learning Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23

Specify Layers of Convolutional Neural Network . . . . . . . . . . . . . . . . . . . 1-30


Image Input Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
Convolutional Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
Batch Normalization Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-35
ReLU Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-35
Cross Channel Normalization (Local Response Normalization) Layer . . . 1-36
Max and Average Pooling Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
Dropout Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-37
Fully Connected Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-37
Output Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-38

Set Up Parameters and Train Convolutional Neural Network . . . . . . . . . 1-41


Specify Solver and Maximum Number of Epochs . . . . . . . . . . . . . . . . . . 1-41
Specify and Modify Learning Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
Specify Validation Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-42

v
Select Hardware Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-42
Save Checkpoint Networks and Resume Training . . . . . . . . . . . . . . . . . . 1-43
Set Up Parameters in Convolutional and Fully Connected Layers . . . . . . 1-43
Train Your Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-43

Deep Learning Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-45


Choose Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-45
Choose Training Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-46
Improve Training Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-47
Fix Errors in Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-48
Prepare and Preprocess Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-49
Use Available Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-51
Fix Errors With Loading from MAT-Files . . . . . . . . . . . . . . . . . . . . . . . . . 1-52

Long Short-Term Memory Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53


LSTM Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53
Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-56
Classification, Prediction, and Forecasting . . . . . . . . . . . . . . . . . . . . . . . 1-57
Sequence Padding, Truncation, and Splitting . . . . . . . . . . . . . . . . . . . . . 1-57
Normalize Sequence Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-60
Out-of-Memory Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61
Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61
LSTM Layer Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61

Deep Network Designer


2
Transfer Learning with Deep Network Designer . . . . . . . . . . . . . . . . . . . . . 2-2

Build Networks with Deep Network Designer . . . . . . . . . . . . . . . . . . . . . . 2-15


Open App and Import Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Create and Edit a Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Check Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
Train Network Using Deep Network Designer . . . . . . . . . . . . . . . . . . . . 2-20
Export Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20

Create Simple Sequence Classification Network Using Deep Network


Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22

Generate MATLAB Code from Deep Network Designer . . . . . . . . . . . . . . 2-31


Generate MATLAB Code to Recreate Network Layers . . . . . . . . . . . . . . . 2-31
Generate MATLAB Code to Train Network . . . . . . . . . . . . . . . . . . . . . . . 2-31

Deep Learning with Images


3
Classify Webcam Images Using Deep Learning . . . . . . . . . . . . . . . . . . . . . 3-2

Train Deep Learning Network to Classify New Images . . . . . . . . . . . . . . . 3-6

vi Contents
Train Residual Network for Image Classification . . . . . . . . . . . . . . . . . . . 3-13

Classify Image Using GoogLeNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23

Extract Image Features Using Pretrained Network . . . . . . . . . . . . . . . . . 3-28

Transfer Learning Using AlexNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33

Create Simple Deep Learning Network for Classification . . . . . . . . . . . . 3-40

Train Convolutional Neural Network for Regression . . . . . . . . . . . . . . . . 3-46

Train Network with Multiple Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54

Convert Classification Network into Regression Network . . . . . . . . . . . . 3-66

Train Generative Adversarial Network (GAN) . . . . . . . . . . . . . . . . . . . . . . 3-72

Train Conditional Generative Adversarial Network (CGAN) . . . . . . . . . . 3-83

Train a Siamese Network to Compare Images . . . . . . . . . . . . . . . . . . . . . 3-96

Train a Siamese Network for Dimensionality Reduction . . . . . . . . . . . . 3-110

Train Variational Autoencoder (VAE) to Generate Images . . . . . . . . . . . 3-124

Deep Learning with Time Series, Sequences, and Text


4
Sequence Classification Using Deep Learning . . . . . . . . . . . . . . . . . . . . . . 4-2

Time Series Forecasting Using Deep Learning . . . . . . . . . . . . . . . . . . . . . . 4-9

Speech Command Recognition Using Deep Learning . . . . . . . . . . . . . . . 4-17

Sequence-to-Sequence Classification Using Deep Learning . . . . . . . . . . 4-34

Sequence-to-Sequence Regression Using Deep Learning . . . . . . . . . . . . 4-39

Classify Videos Using Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-48

Sequence-to-Sequence Classification Using 1-D Convolutions . . . . . . . . 4-58

Classify Text Data Using Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74

Classify Text Data Using Convolutional Neural Network . . . . . . . . . . . . . 4-82

Multilabel Text Classification Using Deep Learning . . . . . . . . . . . . . . . . . 4-91

Sequence-to-Sequence Translation Using Attention . . . . . . . . . . . . . . . 4-111

vii
Generate Text Using Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-131

Pride and Prejudice and MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-137

Word-By-Word Text Generation Using Deep Learning . . . . . . . . . . . . . . 4-143

Image Captioning Using Attention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-149

Deep Learning Tuning and Visualization


5
Deep Dream Images Using GoogLeNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

Grad-CAM Reveals the Why Behind Deep Learning Decisions . . . . . . . . . 5-8

Understand Network Predictions Using Occlusion . . . . . . . . . . . . . . . . . . 5-12

Investigate Classification Decisions Using Gradient Attribution


Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19

Resume Training from Checkpoint Network . . . . . . . . . . . . . . . . . . . . . . . 5-30

Deep Learning Using Bayesian Optimization . . . . . . . . . . . . . . . . . . . . . . 5-34

Run Multiple Deep Learning Experiments in Parallel . . . . . . . . . . . . . . . 5-44

Monitor Deep Learning Training Progress . . . . . . . . . . . . . . . . . . . . . . . . 5-49

Customize Output During Deep Learning Network Training . . . . . . . . . . 5-53

Investigate Network Predictions Using Class Activation Mapping . . . . . 5-57

View Network Behavior Using tsne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-63

Visualize Activations of a Convolutional Neural Network . . . . . . . . . . . . 5-75

Visualize Activations of LSTM Network . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-86

Visualize Features of a Convolutional Neural Network . . . . . . . . . . . . . . 5-90

Visualize Image Classifications Using Maximal and Minimal Activating


Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-97

Monitor GAN Training Progress and Identify Common Failure Modes 5-124
Convergence Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-124
Mode Collapse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-126

viii Contents
Manage Deep Learning Experiments
6
Create a Deep Learning Experiment for Classification . . . . . . . . . . . . . . . 6-2

Create a Deep Learning Experiment for Regression . . . . . . . . . . . . . . . . . 6-7

Evaluate Deep Learning Experiments by Using Metric Functions . . . . . 6-12

Try Multiple Pretrained Networks for Transfer Learning . . . . . . . . . . . . 6-17

Experiment with Weight Initializers for Transfer Learning . . . . . . . . . . . 6-20

Deep Learning in Parallel and the Cloud


7
Scale Up Deep Learning in Parallel and in the Cloud . . . . . . . . . . . . . . . . . 7-2
Deep Learning on Multiple GPUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Deep Learning in the Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Advanced Support for Fast Multi-Node GPU Communication . . . . . . . . . . . 7-4

Deep Learning with MATLAB on Multiple GPUs . . . . . . . . . . . . . . . . . . . . . 7-5


Select Particular GPUs to Use for Training . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Train Network in the Cloud Using Automatic Parallel Support . . . . . . . . . 7-5

Train Network in the Cloud Using Automatic Parallel Support . . . . . . . . 7-10

Use parfeval to Train Multiple Deep Learning Networks . . . . . . . . . . . . . 7-14

Send Deep Learning Batch Job to Cluster . . . . . . . . . . . . . . . . . . . . . . . . . 7-21

Train Network Using Automatic Multi-GPU Support . . . . . . . . . . . . . . . . 7-24

Use parfor to Train Multiple Deep Learning Networks . . . . . . . . . . . . . . 7-28

Upload Deep Learning Data to the Cloud . . . . . . . . . . . . . . . . . . . . . . . . . 7-35

Train Network in Parallel with Custom Training Loop . . . . . . . . . . . . . . . 7-37

Computer Vision Examples


8
Point Cloud Classification Using PointNet Deep Learning . . . . . . . . . . . . 8-2

Import Pretrained ONNX YOLO v2 Object Detector . . . . . . . . . . . . . . . . . 8-25

Export YOLO v2 Object Detector to ONNX . . . . . . . . . . . . . . . . . . . . . . . . 8-31

ix
Object Detection Using SSD Deep Learning . . . . . . . . . . . . . . . . . . . . . . . 8-37

Object Detection Using YOLO v3 Deep Learning . . . . . . . . . . . . . . . . . . . 8-46

Object Detection Using YOLO v2 Deep Learning . . . . . . . . . . . . . . . . . . . 8-64

Semantic Segmentation Using Deep Learning . . . . . . . . . . . . . . . . . . . . . 8-74

Semantic Segmentation Using Dilated Convolutions . . . . . . . . . . . . . . . . 8-90

Semantic Segmentation of Multispectral Images Using Deep Learning


......................................................... 8-95

3-D Brain Tumor Segmentation Using Deep Learning . . . . . . . . . . . . . . 8-112

Define Custom Pixel Classification Layer with Tversky Loss . . . . . . . . . 8-124

Train Object Detector Using R-CNN Deep Learning . . . . . . . . . . . . . . . . 8-131

Object Detection Using Faster R-CNN Deep Learning . . . . . . . . . . . . . . 8-145

Image Processing Examples


9
Remove Noise from Color Image Using Pretrained Neural Network . . . . 9-2

Single Image Super-Resolution Using Deep Learning . . . . . . . . . . . . . . . . 9-8

JPEG Image Deblocking Using Deep Learning . . . . . . . . . . . . . . . . . . . . . 9-23

Image Processing Operator Approximation Using Deep Learning . . . . . 9-36

Deep Learning Classification of Large Multiresolution Images . . . . . . . 9-51

Generate Image from Segmentation Map Using Deep Learning . . . . . . . 9-72

Neural Style Transfer Using Deep Learning . . . . . . . . . . . . . . . . . . . . . . . 9-91

Automated Driving Examples


10
Train a Deep Learning Vehicle Detector . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2

Create Occupancy Grid Using Monocular Camera and Semantic


Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11

x Contents
Signal Processing Examples
11
Radar Waveform Classification Using Deep Learning . . . . . . . . . . . . . . . 11-2

Pedestrian and Bicyclist Classification Using Deep Learning . . . . . . . . 11-15

Label QRS Complexes and R Peaks of ECG Signals Using Deep Network
........................................................ 11-32

Waveform Segmentation Using Deep Learning . . . . . . . . . . . . . . . . . . . 11-42

Modulation Classification with Deep Learning . . . . . . . . . . . . . . . . . . . . 11-60

Classify ECG Signals Using Long Short-Term Memory Networks . . . . . 11-76

Classify Time Series Using Wavelet Analysis and Deep Learning . . . . . 11-93

Audio Examples
12
Train Generative Adversarial Network (GAN) for Sound Synthesis . . . . 12-2

Sequential Feature Selection for Audio Features . . . . . . . . . . . . . . . . . . 12-21

Acoustic Scene Recognition Using Late Fusion . . . . . . . . . . . . . . . . . . . 12-34

Keyword Spotting in Noise Using MFCC and LSTM Networks . . . . . . . 12-55

Speech Emotion Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-77

Spoken Digit Recognition with Wavelet Scattering and Deep Learning


........................................................ 12-89

Cocktail Party Source Separation Using Deep Learning Networks . . . 12-107

Voice Activity Detection in Noise Using Deep Learning . . . . . . . . . . . . 12-129

Denoise Speech Using Deep Learning Networks . . . . . . . . . . . . . . . . . 12-152

Classify Gender Using LSTM Networks . . . . . . . . . . . . . . . . . . . . . . . . . 12-173

Reinforcement Learning Examples


13
Create Simulink Environment and Train Agent . . . . . . . . . . . . . . . . . . . . 13-2

xi
Train DDPG Agent to Swing Up and Balance Pendulum with Image
Observation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-10

Create Agent Using Deep Network Designer and Train Using Image
Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18

Train DDPG Agent to Control Flying Robot . . . . . . . . . . . . . . . . . . . . . . . 13-30

Train Biped Robot to Walk Using Reinforcement Learning Agents . . . 13-36

Train DDPG Agent for Adaptive Cruise Control . . . . . . . . . . . . . . . . . . . 13-47

Train DQN Agent for Lane Keeping Assist Using Parallel Computing . 13-55

Train DDPG Agent for Path Following Control . . . . . . . . . . . . . . . . . . . . 13-63

Predictive Maintenance Examples


14
Chemical Process Fault Detection Using Deep Learning . . . . . . . . . . . . . 14-2

Automatic Differentiation
15
Define Custom Deep Learning Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
Layer Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
Intermediate Layer Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-5
Check Validity of Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-10
Include Layer in Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-11
Output Layer Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-11

Define Custom Deep Learning Layer with Learnable Parameters . . . . . 15-17


Layer with Learnable Parameters Template . . . . . . . . . . . . . . . . . . . . . 15-18
Name the Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-19
Declare Properties and Learnable Parameters . . . . . . . . . . . . . . . . . . . 15-19
Create Constructor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-21
Create Forward Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-22
Completed Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-24
GPU Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-25
Check Validity of Layer Using checkLayer . . . . . . . . . . . . . . . . . . . . . . . 15-25
Include Custom Layer in Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-25

Define Custom Deep Learning Layer with Multiple Inputs . . . . . . . . . . 15-28


Layer with Learnable Parameters Template . . . . . . . . . . . . . . . . . . . . . 15-28
Name the Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-29
Declare Properties and Learnable Parameters . . . . . . . . . . . . . . . . . . . 15-30
Create Constructor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-31
Create Forward Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-32
Completed Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-35

xii Contents
GPU Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-36
Check Validity of Layer with Multiple Inputs . . . . . . . . . . . . . . . . . . . . . 15-36
Use Custom Weighted Addition Layer in Network . . . . . . . . . . . . . . . . . 15-37

Define Custom Classification Output Layer . . . . . . . . . . . . . . . . . . . . . . . 15-39


Classification Output Layer Template . . . . . . . . . . . . . . . . . . . . . . . . . . 15-39
Name the Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-40
Declare Layer Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-40
Create Constructor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-41
Create Forward Loss Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-42
Completed Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-43
GPU Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-43
Check Output Layer Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-44
Include Custom Classification Output Layer in Network . . . . . . . . . . . . 15-44

Define Custom Weighted Classification Layer . . . . . . . . . . . . . . . . . . . . . 15-47


Classification Output Layer Template . . . . . . . . . . . . . . . . . . . . . . . . . . 15-47
Name the Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-48
Declare Layer Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-49
Create Constructor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-49
Create Forward Loss Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-50
Completed Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-51
GPU Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-52
Check Output Layer Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-53

Define Custom Regression Output Layer . . . . . . . . . . . . . . . . . . . . . . . . . 15-54


Regression Output Layer Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-54
Name the Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-55
Declare Layer Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-55
Create Constructor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-56
Create Forward Loss Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-57
Completed Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-58
GPU Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-59
Check Output Layer Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-59
Include Custom Regression Output Layer in Network . . . . . . . . . . . . . . 15-60

Specify Custom Layer Backward Function . . . . . . . . . . . . . . . . . . . . . . . 15-62


Create Custom Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-62
Create Backward Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-63
Complete Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-65
GPU Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-66

Specify Custom Output Layer Backward Loss Function . . . . . . . . . . . . . 15-68


Create Custom Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-68
Create Backward Loss Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-69
Complete Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-70
GPU Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-71

Check Custom Layer Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-73


Check Layer Validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-73
List of Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-74
Generated Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-75
Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-76

Specify Custom Weight Initialization Function . . . . . . . . . . . . . . . . . . . 15-89

xiii
Compare Layer Weight Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-95

Assemble Network from Pretrained Keras Layers . . . . . . . . . . . . . . . . 15-101

Assemble Multiple-Output Network for Prediction . . . . . . . . . . . . . . . 15-106

Automatic Differentiation Background . . . . . . . . . . . . . . . . . . . . . . . . . 15-112


What Is Automatic Differentiation? . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-112
Forward Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-112
Reverse Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-114

Use Automatic Differentiation In Deep Learning Toolbox . . . . . . . . . . 15-117


Custom Training and Calculations Using Automatic Differentiation . . . 15-117
Use dlgradient and dlfeval Together for Automatic Differentiation . . . 15-118
Derivative Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-118
Characteristics of Automatic Derivatives . . . . . . . . . . . . . . . . . . . . . . 15-119

Define Custom Training Loops, Loss Functions, and Networks . . . . . . 15-121


Define Custom Training Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-121
Define Custom Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-122

Specify Training Options in Custom Training Loop . . . . . . . . . . . . . . . 15-125


Solver Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-126
Learn Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-126
Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-127
Verbose Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-128
Mini-Batch Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-129
Number of Epochs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-129
Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-129
L2 Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-131
Gradient Clipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-131
Single CPU or GPU Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-132
Checkpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-132

Train Network Using Custom Training Loop . . . . . . . . . . . . . . . . . . . . . 15-134

Update Batch Normalization Statistics in Custom Training Loop . . . 15-140

Make Predictions Using dlnetwork Object . . . . . . . . . . . . . . . . . . . . . . 15-146

Train Network Using Model Function . . . . . . . . . . . . . . . . . . . . . . . . . . 15-149

Update Batch Normalization Statistics Using Model Function . . . . . . 15-161

Make Predictions Using Model Function . . . . . . . . . . . . . . . . . . . . . . . 15-173

Train Network Using Cyclical Learn Rate for Snapshot Ensembling . 15-178

List of Functions with dlarray Support . . . . . . . . . . . . . . . . . . . . . . . . . 15-194


Deep Learning Toolbox Functions with dlarray Support . . . . . . . . . . . 15-194
MATLAB Functions with dlarray Support . . . . . . . . . . . . . . . . . . . . . . 15-196
Notable dlarray Behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-203

xiv Contents
Deep Learning Data Preprocessing
16
Datastores for Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2
Select Datastore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2
Input Datastore for Training, Validation, and Inference . . . . . . . . . . . . . . 16-3
Specify Read Size and Mini-Batch Size . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4
Transform and Combine Datastores . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4
Use Datastore for Parallel Training and Background Dispatching . . . . . . 16-7

Preprocess Images for Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8


Resize Images Using Rescaling and Cropping . . . . . . . . . . . . . . . . . . . . . 16-8
Augment Images for Training with Random Geometric Transformations
..................................................... 16-9
Perform Additional Image Processing Operations Using Built-In Datastores
.................................................... 16-10
Apply Custom Image Processing Pipelines Using Combine and Transform
.................................................... 16-10

Preprocess Volumes for Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . 16-12


Read Volumetric Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-12
Associate Image and Label Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15
Preprocess Volumetric Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15

Preprocess Data for Domain-Specific Deep Learning Applications . . . . 16-19


Image Processing Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-19
Object Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-21
Semantic Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-22
Signal Processing Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-23
Audio Processing Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-25
Text Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-27

Develop Custom Mini-Batch Datastore . . . . . . . . . . . . . . . . . . . . . . . . . . 16-28


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-28
Implement MiniBatchable Datastore . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-28
Add Support for Shuffling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-32
Validate Custom Mini-Batch Datastore . . . . . . . . . . . . . . . . . . . . . . . . . 16-32

Augment Images for Deep Learning Workflows Using Image Processing


Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-34

Augment Pixel Labels for Semantic Segmentation . . . . . . . . . . . . . . . . 16-57

Augment Bounding Boxes for Object Detection . . . . . . . . . . . . . . . . . . . 16-67

Prepare Datastore for Image-to-Image Regression . . . . . . . . . . . . . . . . 16-80

Train Network Using Out-of-Memory Sequence Data . . . . . . . . . . . . . . . 16-89

Train Network Using Custom Mini-Batch Datastore for Sequence Data


........................................................ 16-94

Classify Out-of-Memory Text Data Using Deep Learning . . . . . . . . . . . . 16-98

xv
Classify Out-of-Memory Text Data Using Custom Mini-Batch Datastore
....................................................... 16-104

Data Sets for Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-108


Image Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-108
Time Series and Signal Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-121
Video Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-130
Text Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-131
Audio Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-136

Deep Learning Code Generation


17
Code Generation for Deep Learning Networks . . . . . . . . . . . . . . . . . . . . . 17-2

Code Generation for Semantic Segmentation Network . . . . . . . . . . . . . 17-10

Lane Detection Optimized with GPU Coder . . . . . . . . . . . . . . . . . . . . . . . 17-14

Code Generation for a Sequence-to-Sequence LSTM Network . . . . . . . 17-25

Deep Learning Prediction on ARM Mali GPU . . . . . . . . . . . . . . . . . . . . . 17-30

Code Generation for Object Detection by Using YOLO v2 . . . . . . . . . . . 17-33

Integrating Deep Learning with GPU Coder into Simulink . . . . . . . . . . 17-36

Deep Learning Prediction by Using NVIDIA TensorRT . . . . . . . . . . . . . . 17-42

Deep Learning Prediction by Using Different Batch Sizes . . . . . . . . . . . 17-46

Traffic Sign Detection and Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . 17-50

Logo Recognition Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-58

Pedestrian Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-62

Code Generation for Denoising Deep Neural Network . . . . . . . . . . . . . . 17-69

Train and Deploy Fully Convolutional Networks for Semantic


Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-73

Code Generation for Semantic Segmentation Network by Using U-net


........................................................ 17-84

Code Generation for Deep Learning on ARM Targets . . . . . . . . . . . . . . 17-91

Code Generation for Deep Learning on Raspberry Pi . . . . . . . . . . . . . . 17-96

Deep Learning Prediction with ARM Compute Using cnncodegen . . . 17-101

xvi Contents
Deep Learning Prediction with Intel MKL-DNN . . . . . . . . . . . . . . . . . . 17-104

Generate C++ Code for Object Detection Using YOLO v2 and Intel MKL-
DNN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-111

Code Generation and Deployment of MobileNet-v2 Network to Raspberry


Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-114

Neural Network Design Book

Neural Network Objects, Data, and Training Styles


18
Workflow for Neural Network Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-2

Four Levels of Neural Network Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-3

Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-4


Simple Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-4
Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-5
Neuron with Vector Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-5

Neural Network Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-8


One Layer of Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-8
Multiple Layers of Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-10
Input and Output Processing Functions . . . . . . . . . . . . . . . . . . . . . . . . 18-11

Create Neural Network Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-13

Configure Shallow Neural Network Inputs and Outputs . . . . . . . . . . . . 18-16

Understanding Shallow Network Data Structures . . . . . . . . . . . . . . . . . 18-18


Simulation with Concurrent Inputs in a Static Network . . . . . . . . . . . . 18-18
Simulation with Sequential Inputs in a Dynamic Network . . . . . . . . . . . 18-19
Simulation with Concurrent Inputs in a Dynamic Network . . . . . . . . . . 18-20

Neural Network Training Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-22


Incremental Training with adapt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-22
Batch Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-24
Training Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-26

xvii
Multilayer Shallow Neural Networks and Backpropagation
Training
19
Multilayer Shallow Neural Networks and Backpropagation Training . . . 19-2

Multilayer Shallow Neural Network Architecture . . . . . . . . . . . . . . . . . . 19-3


Neuron Model (logsig, tansig, purelin) . . . . . . . . . . . . . . . . . . . . . . . . . . 19-3
Feedforward Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-4

Prepare Data for Multilayer Shallow Neural Networks . . . . . . . . . . . . . . 19-6

Choose Neural Network Input-Output Processing Functions . . . . . . . . . 19-7


Representing Unknown or Don't-Care Targets . . . . . . . . . . . . . . . . . . . . 19-8

Divide Data for Optimal Neural Network Training . . . . . . . . . . . . . . . . . . 19-9

Create, Configure, and Initialize Multilayer Shallow Neural Networks


........................................................ 19-11
Other Related Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-11
Initializing Weights (init) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-12

Train and Apply Multilayer Shallow Neural Networks . . . . . . . . . . . . . . 19-13


Training Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-13
Training Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-15
Use the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-17

Analyze Shallow Neural Network Performance After Training . . . . . . . 19-18


Improving Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-21

Limitations and Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-22

Dynamic Neural Networks


20
Introduction to Dynamic Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . 20-2

How Dynamic Neural Networks Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-3


Feedforward and Recurrent Neural Networks . . . . . . . . . . . . . . . . . . . . . 20-3
Applications of Dynamic Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-7
Dynamic Network Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-8
Dynamic Network Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-9

Design Time Series Time-Delay Neural Networks . . . . . . . . . . . . . . . . . 20-10


Prepare Input and Layer Delay States . . . . . . . . . . . . . . . . . . . . . . . . . . 20-13

Design Time Series Distributed Delay Neural Networks . . . . . . . . . . . . 20-14

Design Time Series NARX Feedback Neural Networks . . . . . . . . . . . . . 20-16


Multiple External Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-20

xviii Contents
Design Layer-Recurrent Neural Networks . . . . . . . . . . . . . . . . . . . . . . . 20-22

Create Reference Model Controller with MATLAB Script . . . . . . . . . . . 20-24

Multiple Sequences with Dynamic Neural Networks . . . . . . . . . . . . . . . 20-29

Neural Network Time-Series Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-30

Train Neural Networks with Error Weights . . . . . . . . . . . . . . . . . . . . . . . 20-32

Normalize Errors of Multiple Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-35

Multistep Neural Network Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-39


Set Up in Open-Loop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-39
Multistep Closed-Loop Prediction From Initial Conditions . . . . . . . . . . . 20-39
Multistep Closed-Loop Prediction Following Known Sequence . . . . . . . 20-40
Following Closed-Loop Simulation with Open-Loop Simulation . . . . . . . 20-41

Control Systems
21
Introduction to Neural Network Control Systems . . . . . . . . . . . . . . . . . . 21-2

Design Neural Network Predictive Controller in Simulink . . . . . . . . . . . 21-4


System Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-4
Predictive Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-5
Use the Neural Network Predictive Controller Block . . . . . . . . . . . . . . . . 21-6

Design NARMA-L2 Neural Controller in Simulink . . . . . . . . . . . . . . . . . 21-13


Identification of the NARMA-L2 Model . . . . . . . . . . . . . . . . . . . . . . . . . 21-13
NARMA-L2 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-14
Use the NARMA-L2 Controller Block . . . . . . . . . . . . . . . . . . . . . . . . . . 21-15

Design Model-Reference Neural Controller in Simulink . . . . . . . . . . . . 21-19


Use the Model Reference Controller Block . . . . . . . . . . . . . . . . . . . . . . 21-20

Import-Export Neural Network Simulink Control Systems . . . . . . . . . . 21-26


Import and Export Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-26
Import and Export Training Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-28

Radial Basis Neural Networks


22
Introduction to Radial Basis Neural Networks . . . . . . . . . . . . . . . . . . . . . 22-2
Important Radial Basis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-2

Radial Basis Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-3


Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-3
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-4

xix
Exact Design (newrbe) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-5
More Efficient Design (newrb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-6
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-6

Probabilistic Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-8


Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-8
Design (newpnn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-9

Generalized Regression Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . 22-11


Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-11
Design (newgrnn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-12

Self-Organizing and Learning Vector Quantization Networks


23
Introduction to Self-Organizing and LVQ . . . . . . . . . . . . . . . . . . . . . . . . . 23-2
Important Self-Organizing and LVQ Functions . . . . . . . . . . . . . . . . . . . . . 23-2

Cluster with a Competitive Neural Network . . . . . . . . . . . . . . . . . . . . . . . 23-3


Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-3
Create a Competitive Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . 23-3
Kohonen Learning Rule (learnk) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-4
Bias Learning Rule (learncon) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-5
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-5
Graphical Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-6

Cluster with Self-Organizing Map Neural Network . . . . . . . . . . . . . . . . . 23-8


Topologies (gridtop, hextop, randtop) . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-9
Distance Functions (dist, linkdist, mandist, boxdist) . . . . . . . . . . . . . . . 23-12
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-14
Create a Self-Organizing Map Neural Network (selforgmap) . . . . . . . . . 23-14
Training (learnsomb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-16
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-17

Learning Vector Quantization (LVQ) Neural Networks . . . . . . . . . . . . . 23-26


Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-26
Creating an LVQ Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-27
LVQ1 Learning Rule (learnlv1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-29
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-30
Supplemental LVQ2.1 Learning Rule (learnlv2) . . . . . . . . . . . . . . . . . . . 23-31

Adaptive Filters and Adaptive Training


24
Adaptive Neural Network Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-2
Adaptive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-2
Linear Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-2
Adaptive Linear Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 24-3
Least Mean Square Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-5

xx Contents
LMS Algorithm (learnwh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-6
Adaptive Filtering (adapt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-6

Advanced Topics
25
Neural Networks with Parallel and GPU Computing . . . . . . . . . . . . . . . . 25-2
Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-2
Modes of Parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-2
Distributed Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-2
Single GPU Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-4
Distributed GPU Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-6
Parallel Time Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-7
Parallel Availability, Fallbacks, and Feedback . . . . . . . . . . . . . . . . . . . . . 25-8

Optimize Neural Network Training Speed and Memory . . . . . . . . . . . . . 25-10


Memory Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-10
Fast Elliot Sigmoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-10

Choose a Multilayer Neural Network Training Function . . . . . . . . . . . . 25-14


SIN Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-15
PARITY Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-16
ENGINE Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-18
CANCER Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-19
CHOLESTEROL Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-21
DIABETES Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-22
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-24

Improve Shallow Neural Network Generalization and Avoid Overfitting


........................................................ 25-25
Retraining Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-26
Multiple Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-27
Early Stopping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-28
Index Data Division (divideind) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-28
Random Data Division (dividerand) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-29
Block Data Division (divideblock) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-29
Interleaved Data Division (divideint) . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-29
Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-29
Summary and Discussion of Early Stopping and Regularization . . . . . . 25-31
Posttraining Analysis (regression) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-33

Edit Shallow Neural Network Properties . . . . . . . . . . . . . . . . . . . . . . . . . 25-35


Custom Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-35
Network Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-36
Network Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-43

Custom Neural Network Helper Functions . . . . . . . . . . . . . . . . . . . . . . . 25-45

Automatically Save Checkpoints During Neural Network Training . . . 25-46

Deploy Shallow Neural Network Functions . . . . . . . . . . . . . . . . . . . . . . . 25-48


Deployment Functions and Tools for Trained Networks . . . . . . . . . . . . . 25-48

xxi
Generate Neural Network Functions for Application Deployment . . . . . 25-48
Generate Simulink Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-50

Deploy Training of Shallow Neural Networks . . . . . . . . . . . . . . . . . . . . . 25-51

Historical Neural Networks


26
Historical Neural Networks Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-2

Perceptron Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-3


Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-3
Perceptron Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-4
Create a Perceptron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-5
Perceptron Learning Rule (learnp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-6
Training (train) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-8
Limitations and Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-12

Linear Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-14


Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-14
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-15
Least Mean Square Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-17
Linear System Design (newlind) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-18
Linear Networks with Delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-18
LMS Algorithm (learnwh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-20
Linear Classification (train) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-21
Limitations and Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-23

Neural Network Object Reference


27
Neural Network Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-2
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-2
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-2
Subobject Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-5
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-6
Weight and Bias Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-9

Neural Network Subobject Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-11


Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-11
Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-12
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-16
Biases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-18
Input Weights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-19
Layer Weights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-20

xxii Contents
Function Approximation, Clustering, and Control Examples
28
Body Fat Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-2

Crab Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-9

Wine Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-17

Cancer Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-24

Character Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-32

Train Stacked Autoencoders for Image Classification . . . . . . . . . . . . . . 28-36

Iris Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-45

Gene Expression Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-53

Maglev Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-61

Competitive Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-71

One-Dimensional Self-organizing Map . . . . . . . . . . . . . . . . . . . . . . . . . . 28-74

Two-Dimensional Self-organizing Map . . . . . . . . . . . . . . . . . . . . . . . . . . 28-76

Radial Basis Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-79

Radial Basis Underlapping Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-83

Radial Basis Overlapping Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-85

GRNN Function Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-87

PNN Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-91

Learning Vector Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-95

Linear Prediction Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-98

Adaptive Linear Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-102

Classification with a 2-Input Perceptron . . . . . . . . . . . . . . . . . . . . . . . . 28-106

Outlier Input Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-111

Normalized Perceptron Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-117

Linearly Non-separable Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-123

Pattern Association Showing Error Surface . . . . . . . . . . . . . . . . . . . . . 28-126

xxiii
Training a Linear Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-129

Linear Fit of Nonlinear Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-132

Underdetermined Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-136

Linearly Dependent Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-140

Too Large a Learning Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-141

Adaptive Noise Cancellation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-145

Shallow Neural Networks Bibliography


29
Shallow Neural Networks Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . 29-2

Mathematical Notation
A
Mathematics and Code Equivalents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Mathematics Notation to MATLAB Notation . . . . . . . . . . . . . . . . . . . . . . . A-2
Figure Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2

Neural Network Blocks for the Simulink Environment


B
Neural Network Simulink Block Library . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Transfer Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Net Input Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
Weight Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3
Processing Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3

Deploy Shallow Neural Network Simulink Diagrams . . . . . . . . . . . . . . . . . B-5


Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5
Suggested Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-7
Generate Functions and Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-7

xxiv Contents
Code Notes
C
Deep Learning Toolbox Data Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . C-2
Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-2
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-2

xxv
1

Deep Networks

• “Deep Learning in MATLAB” on page 1-2


• “Deep Learning with Big Data on GPUs and in Parallel” on page 1-8
• “Pretrained Deep Neural Networks” on page 1-12
• “Learn About Convolutional Neural Networks” on page 1-19
• “Multiple-Input and Multiple-Output Networks” on page 1-21
• “List of Deep Learning Layers” on page 1-23
• “Specify Layers of Convolutional Neural Network” on page 1-30
• “Set Up Parameters and Train Convolutional Neural Network” on page 1-41
• “Deep Learning Tips and Tricks” on page 1-45
• “Long Short-Term Memory Networks” on page 1-53
1 Deep Networks

Deep Learning in MATLAB


In this section...
“What Is Deep Learning?” on page 1-2
“Try Deep Learning in 10 Lines of MATLAB Code” on page 1-4
“Start Deep Learning Faster Using Transfer Learning” on page 1-5
“Train Classifiers Using Features Extracted from Pretrained Networks” on page 1-6
“Deep Learning with Big Data on CPUs, GPUs, in Parallel, and on the Cloud” on page 1-6

What Is Deep Learning?


Deep learning is a branch of machine learning that teaches computers to do what comes naturally to
humans: learn from experience. Machine learning algorithms use computational methods to “learn”
information directly from data without relying on a predetermined equation as a model. Deep
learning is especially suited for image recognition, which is important for solving problems such as
facial recognition, motion detection, and many advanced driver assistance technologies such as
autonomous driving, lane detection, pedestrian detection, and autonomous parking.

Deep Learning Toolbox provides simple MATLAB commands for creating and interconnecting the
layers of a deep neural network. Examples and pretrained networks make it easy to use MATLAB for
deep learning, even without knowledge of advanced computer vision algorithms or neural networks.

For a free hands-on introduction to practical deep learning methods, see Deep Learning Onramp.

What Do You Want to Do? Learn More


Perform transfer learning to fine-tune a network “Start Deep Learning Faster Using Transfer
with your data Learning” on page 1-5

Tip Fine-tuning a pretrained network to learn a


new task is typically much faster and easier than
training a new network.
Classify images with pretrained networks “Pretrained Deep Neural Networks” on page 1-
12
Create a new deep neural network for “Create Simple Deep Learning Network for
classification or regression Classification” on page 3-40

“Train Convolutional Neural Network for


Regression” on page 3-46
Resize, rotate, or preprocess images for training “Preprocess Images for Deep Learning” on page
or prediction 16-8
Label your image data automatically based on “Train Network for Image Classification”
folder names, or interactively using an app
Image Labeler

1-2
Deep Learning in MATLAB

What Do You Want to Do? Learn More


Create deep learning networks for sequence and “Sequence Classification Using Deep Learning”
time series data. on page 4-2

“Time Series Forecasting Using Deep Learning”


on page 4-9
Classify each pixel of an image (for example, “Getting Started with Semantic Segmentation
road, car, pedestrian) Using Deep Learning” (Computer Vision Toolbox)
Detect and recognize objects in images “Deep Learning, Semantic Segmentation, and
Detection” (Computer Vision Toolbox)
Classify text data “Classify Text Data Using Deep Learning” on
page 4-74
Classify audio data for speech recognition “Speech Command Recognition Using Deep
Learning” on page 4-17
Visualize what features networks have learned “Deep Dream Images Using GoogLeNet” on page
5-2

“Visualize Activations of a Convolutional Neural


Network” on page 5-75
Train on CPU, GPU, multiple GPUs, in parallel on “Deep Learning with Big Data on GPUs and in
your desktop or on clusters in the cloud, and Parallel” on page 1-8
work with data sets too large to fit in memory

To learn more about deep learning application areas, including automated driving, see “Deep
Learning Applications”.

To choose whether to use a pretrained network or create a new deep network, consider the scenarios
in this table.

Use a Pretrained Network for Create a New Deep Network


Transfer Learning
Training Data Hundreds to thousands of Thousands to millions of labeled
labeled images (small) images
Computation Moderate computation (GPU Compute intensive (requires
optional) GPU for speed)
Training Time Seconds to minutes Days to weeks for real problems
Model Accuracy Good, depends on the High, but can overfit to small
pretrained model data sets

For more information, see “Choose Network Architecture” on page 1-45.

Deep learning uses neural networks to learn useful representations of features directly from data.
Neural networks combine multiple nonlinear processing layers, using simple elements operating in
parallel and inspired by biological nervous systems. Deep learning models can achieve state-of-the-art
accuracy in object classification, sometimes exceeding human-level performance.

You train models using a large set of labeled data and neural network architectures that contain many
layers, usually including some convolutional layers. Training these models is computationally
intensive and you can usually accelerate training by using a high performance GPU. This diagram

1-3
Another Random Scribd Document
with Unrelated Content
The Project Gutenberg eBook of The Esperantist,
Vol. 2, No. 7
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: The Esperantist, Vol. 2, No. 7

Editor: H. Bolingbroke Mudie

Release date: January 14, 2014 [eBook #44666]


Most recently updated: October 24, 2024

Language: Esperanto

Credits: Produced by Andrew Sly, Louise Hope, David Starner and


the
Online Distributed Proofreading Team at
http://www.pgdp.net
(This book was produced from scanned images of public
domain material from the Google Print project.)

*** START OF THE PROJECT GUTENBERG EBOOK THE ESPERANTIST,


VOL. 2, NO. 7 ***
Transcriber’s Notes

A few minor typographical errors have been corrected


without notice. However, many grammatical errors and odd
spellings have been left as in the original.

SINGLE COPIES PRICE FOURPENCE NET.

21. (Vol. II., No. THE Julio. 1905


7.) ESPERANTIST
La Esperanta Gazeto por la
Propagando de la Internacia Lingvo.

ANNUAL SUBSCRIPTION: 3/- (4 francs; 1½ roubles; 75 cents).

Wholesale Agents: 41, Outer Temple, London, W.C.

All Communications should be sent to THE EDITOR, 67, Kensington Gardens


Square, London, W.
CONTENTS.
AVIZO GRAVA.
Page
Month by Month 97 La malnova firmo Buchanan,
Scott & Co., fondita en la jaro
Saved from Death 98 1870, prezentas siajn
(General Cox) komplimentojn al la
An Almost Modern Hermit 100 Esperantistaro kaj anoncas ke,
(E.W.) post nelonge, interesa kaj
The Spanish Armada, Lord 102 enspeziga propono aperos en tiu
Macaulay (translated by ĉi spaco. Ĉiu Esperantisto, ĉu
Ben Elmy) membro de la konata grupo aŭ
A Little Music, from Dan 103 kies nomo enskribiĝis en la
Leno (translated by A. Adresaro de Dro Zamenhof, kiu
J. Hulme) volas akcepti tiun ĉi proponon
Reminiscences, Part VII. 104 povos samtempe ne nur ŝpari al
(Edward Metcalfe, M.A., si specialan rabaton sed ankaŭ
Oxon) antaŭenpuŝi la disvastigon de
The Universal Congress at Esperanto.
105
Boulogne
BUCHANAN, SCOTT & CO.,
The Four Henrys (A. 106
Motteau) Garthland Street,
Notes on the Orient 107 Glasgow, Scotland.
(Colonel H. K. Gordon)
Three Greenhorns (by 108
10549, N.Z.)
A Bachelor’s Notions on 110
Shopping (by 9911)
An Esperanto 111
Evercirculator (Dr.
Martyn Westcott)
From New Zealand 112
(Edward Young)
Korsica, Seen from Italy 112
(Clarence Bicknell)

The Remington La Remington

THE UNIVERSAL TYPEWRITER. LA UNIVERSALA SKRIBMAŜINO.

Just think of it! Pripensu je tio!

THE INTERNATIONAL MACHINE. LA INTERNACIA MAŜINO.

Unbound by ties of nationality: Tute liberiĝita de naciaj ligiloj:


The common bond of union of all La Komuna unuigilo por ĉiuj
civilised peoples. civilizitaj popoloj.

The Remington can be supplied La Remington estos liverita kun


fitted for Esperanto. Esperantaj presliteroj.

THE REMINGTON TYPEWRITER LA REMINGTON TYPEWRITER


COMPANY, KOMPANIO,
100, Gracechurch St., London, 100, Gracechurch St., Londono,
E.C. E.C.

ĈIUJ, NI POVOS
PARADIZON IRI. The "Review of
Kiu bone trinkas, Reviews"
Tiu bone dormas. Is the Best Magazine for
Kiu bone dormas,
Tiu ne pensas malbone.
Busy People. And it is
Kiu ne pensas malbone, read by ‘Esperanto’
Tiu certe ne pekas. Students.
Nu, ĉar kiu ne pekas.
Paradizon eniros. The aim of this Magazine is to
De nun, bone trinku. make the Best Thoughts of the
Kaj vi paradizon iros. Best Writers universally
accessible at a Trifling Cost.
Por tio ĉi, oni devas aĉeti bonajn
vinojn, kaj sin turni al:— The busiest and poorest in the
Sro. Ch. Jadeau en Mercurey community may here follow with
(S. & L.) France. intelligent interest the great
movements of Contemporary
History.

Post Free for Twelve


Months, 8/6,
FOR SALE. 10 fr. 75 c., or 8.50
marks.
160 Guinea ‘Broadwood’ Grand
Piano for £63. In fine Office: MOWBRAY HOUSE,
condition; Rosewood. For all NORFOLK ST. LONDON.
particulars write to The Editor.

Correspondence Lessons
in Esperanto
ARE GIVEN BY
Mr. A. MOTTEAU, Certified
Teacher of Esperanto. 157,
Earlham Grove. Forest Gate,
London, E.

7/6 the Quarter.

Adresareto de Personoj kiuj deziras


Korespondadi.

Sro. G. L. Browne, Agento por Patentoj, 433, Birkbeck Bank


Buildings, London, W.C. Korespondados Esperante pri Patentoj
kaj ĉiuj aferoj.
Frl. Mitchell, Acuba House, 65, Marquess Road, Canonbury, N. Kun
alilanduloj por ilus. p-k.
Sro. W. Miles, Inĝeniero, 80, Station Road, Petersfield, Anglujo.
Deziras kor. kun Esperantistoj per ilus. p-k. Tuj kaj ĉiam resp.
Sro. John Thompson, 52, Blake Street, Barrow-in-Furness, Anglujo.
Nemetia forografanto. Deziras interŝ. kun Anglaj & fremdaj
Esperantistoj fotajn vidaĵojn de Barrow, kontraŭ tiuj de iliaj
urboj. Ĉiam respondos. Deziras renkonti Esperantistojn en
Barrow.

La Kosto de la Enskribo estas 6d. (70c. poŝtmarkoj).


THE ESPERANTIST
The Esperanto Gazette for the Spread of the International Language.

H. Bolingbroke Mudie. Esq., 67


ABONPAGOJ ESTAS Kensington Gardens Square, London
RICEVEBLAJ ĈE W.
SUBSCRIPTIONS SHOULD BE AUSTRIA.—Sro. T. Cejka, Bystrice Hostyn,
SENT TO Moravia.
BELGIUM.—M. M. Seynaeve, 3, Rue de l’Aven
Courtrai.
FRANCE.—Grupo Pariza, 28, rue Serpente,
Paris.
GERMANY.—Doktoro Mybs, 68, Markt Strasse
Altona, Elbe.
NEW ZEALAND.—Esperanto Society, P.O. Box
50, Auckland.
RUSSIA.—Societo Espero, Bol Podjaceskaja 24
log 12, St. Petersburg.
SWEDEN.—Sro. P. Ahlberg, 50, Döbelnsgatan,
Stockholm.

Nepresitajn manuskriptojn la Redakcio resendos se


N.B. oni aldonis poŝtmarkon.
N.B.
Alsendatajn artikolojn la Redakcio laŭ bezono
korektos.

Oni povas sendi la abonpagon per poŝtmarkoj, kiuj estas akceptataj


laŭvaloro.

Oni sendu ĉiujn artikolojn, demandojn kaj avizojn al La Redaktoro, 67,


Kensington Gardens Square, London, W.

JULIO, 1905.
21. [Vol. II., No. Subscription, 3s. Per
Annum. Single
7.] Copies, 4d. net. Nos
2 to 13. 6d. each;
Later issues 4d. each
net.

MONATO POST MONTH BY MONTH.


MONATO.
The British Esperanto Association
La Brita Esperanto Asocio havis, held, at the beginning of June,
je la komenco de la monato, sian its first half-yearly meeting in the
unuan duon-jar-kunvenon ĉe Essex Hall. Colonel Pollen, C.I.E.,
Essex Hall. Kolonelo Pollen, V.D., LL.D., the President, was in
C.I.E., V.D., LL.D., la Prezidanto, the chair.
prezidis.
After an interesting speech and a
Post interesa parolado kaj synopsis of the financial
resumo de la financa situacio, kiu situation, which has been
jam klariĝis aliloke, oni alvenis al explained elsewhere, the chief
la ĉefa devo de la kunsido—la purpose of the meeting was
konfirmo de la proponita broached—the confirmation of
regularo. the proposed regulations.

Tiu ĉi regularo ja estis treege This set of rules is indeed


longega, kaj la komitato devas exceedingly lengthy, and the
esti pripensinta ĉiajn eblajn committee must have considered
okazojn. Enfine, post malmultaj all sorts of emergencies! Finally,
plibonigoj, ili konfirmiĝis, kaj ĉiuj after a few amendments, they
kiuj volas ilin legi, povas aĉeti ilin were confirmed, and all who
desire to read them can
ĉe la B.E.A., 13, Arundel Street, purchase them from the B.E.A.,
Strand, W.C. 13, Arundel Street, W.C.

Estas nia espero ke ĉiuj varmaj It is our hope that all warm
aprobantoj fariĝos Fratruloj de supporters will become Fellows
tiu Asocio. Ni mem tre kontente of that Association. We ourselves
estus farintaj same; sed, kiam ni would gladly have done so; but
eltrovis, ke estus necese konstati when we discovered that it
ĉion, kion oni faris pri, pro, per would be necessary to declare all
kaj por Esperanto por pruvi, ke that one had done for Esperanto,
oni meritis la honoron, kaj ankaŭ in order to prove that the honour
devus trovi tri atestantojn por had been merited, and also to
pruvi, ke oni estas sufiĉe find three witnesses to prove
respektinda, ni devis forlasi la one’s adequate respectability, we
proponon, kaj restas nur simpla had to forsake the intention and
membro, tamen ne malpli fervora remain merely an ordinary
pro tio! member, but none the less
devoted on that account!
Ni kore esperas, ke la B.E.A. ne
sendos tiun longegan regularon, We heartily trust that the B.E.A.
k.t.p., al ĉiuj personoj, kiuj will not send this lengthy set of
proponas aniĝi estonte, alie, se regulations, etc., to all persons
ni ne eraras, la B.E.A. trovos, ke proposing to become future
iliaj eblaj estontaj membroj members, otherwise, if we err
havos nek tempon, nek volon, not, the B.E.A. will find that their
tralegi la ĉion, kaj, sekve, neniam would-be future members will
sendos la kotizaĵon! have neither the time nor the
desire to wade through the lot,
Inter la novaj eldonaĵoj ricevitaj and, in consequence, will never
dum Junio estis tre originala send in the subscription.
verketo, "Une heure
d’Esperanto," verkita de la Among the new publications
energia pro-blindula received in June was a most
propagandisto Profesoro Cart. Ĝi original little work, "An Hour of
estas diologo per la Franca Esperanto" (Horo pri kaj per
lingvo, ĝis la alveno de Esperanto), by Prof. Cart. It is a
"L’Etrangère," kiu parolas dialogue conducted in French,
Esperante. Franc-legantaj until the arrival of "The
Esperantistoj saĝe sendos 50c. al Foreigner," who speaks in
33, rue Lacépède, Paris, por Esperanto. Readers of French will
ricevi ĝin. wisely send 6d. to 33, rue
Lacepede, Paris, to obtain it.
Sro Motteau nun pretigas
tradukon de Ŝi kliniĝas por Venki, Mr. Motteau is preparing a
dramo de Sheridan. Ni esperas translation of Sheridan’s drama,
eldonigi ĝin antaŭ la Kongreso. She Stoops to Conquer. We hope
Ĝi estas samkosta kun la La to publish it before the Congress.
Ventego, kies unua Arta Eldono It is uniform with The Tempest,
elĉerpiĝis. Oni do povas nune the Art Edition of which is sold
aĉeti la art-tukan eldonon, kun out. One can, however, at
ilustraĵoj, je kosto 2f. 60c., present obtain the art-cloth
afrankite. edition, illustrated, for 2s. 2d.,
post free.
Dro Martyn Westcott, kies nomo
estas tiel bone konata pro liaj Dr. Martyn Westcott, whose
ŝatajaj rakontoj sur niaj paĝoj, name is so well-known on
verkis tradukon de la Kristnaska account of his popular narratives
Kanto, de Dickens. Ĝi estas in our pages, has translated
eldonota, kaj estos valora aldono Dickens’ Christmas Carol. It is
al nia Internacia Biblioteko. about to be published, and will
be a valuable addition to our
Multaj samideanoj kontente International Library.
lernos, ke la Londona Klubo
havos sian unuan ekzamenon Many friends-in-Esperanto will
por Atesto pri Kapableco ĉe St. gladly learn that the L.E.C. will
Bride’s Institute, Fleet Street, hold its first examination for
Julion 7, je la sepa horo. Proficiency at St. Bride’s
Partoprenantoj je tiu ĉi unua Institute, Bride Lane, Fleet
Brita Ekzameno nur devos pagi Street, E.C., on July 7th, at 7
1f. 70c. (anstataŭ la kutiman 3f.), o’clock. Competitors in this first
kaj ni esperas ke la nomaro de British Examination need pay
granda nombro (almenaŭ de la only 1s. 4d. (instead of the usual
Londonaj anoj) povos presiĝi 2s. 6d.), and we hope that the
antaŭ la venonta Kongreso. Tiuj, names of a goodly number (at
kiuj deziras ekzameniĝi, povas any rate of the London
ricevi ĉiajn sciigojn de la B.E.A., members) may be printed before
13, Arundel Street, W.C., kaj the coming Congress. Those
devos sendi siajn nomojn al la desirous of being examined can
Hon. Sek. de la Londona Klubo, obtain all information from the
14, Norfolk Street, Strand, antaŭ B.E.A., 13, Arundel Street, W.C.,
Julio 5. and must send in their names to
the Hon Sec., London Esperanto
Club, before July 5th.

SAVITA DE MORTO.

Originale verkita de Generalo George Cox.

ĈAPITRO I.

"Vi mankos la vaganaron, sinjoroj, se vi ne rapidos," ekkriis la


hotelportisto, kiu staradis malantaŭ ni ĉe la eniro de la hotelo, portanta
en mano tualetsakon kaj kelkajn paketojn.

"Atendu momenton, dum mi kuras al la hotel-oficejo por ricevi mian


monujon," diris la maljuna sinjoro.

"Jen mi! tute preta!" li ekkriis post momento, lamirante al ni tra la


koridoro tiel rapide kiel li povis, "estis tri cent livra bankbileto en mia
monujo, tial mi pensis, ke estos pli senriske ĝin lasi en la oficejo, ĉar mi
havis aferojn en la urbo hodiaŭ posttagmeze; kaj Londono ne estas la
plej sendanĝera loko en la mondo ĉirkaŭporti en poŝo tri cent livrajn
bankbiletojn! Ĉu ne vere?"

"Apenaŭ," respondis mia frato, ridante, kiel ni ĉiuj tri rapidiris sur la
fervojan trotuaron, sekvataj de la hotelportisto, "se mi havus unu, mi
bone scias, ke mi ĝin perdus dum malpli ol kvin minutoj."
"Dum kvin minutoj," ekkriis la maljuna sinjoro, turnante sin rapide.
"Kiel?"

"Nu! ĝi bruligus truon en mia poŝo," rediris mia frato.

"Ha! ha!" li ridis. "Mi rememoros tion, kaj diros al mia edzino, kiam mi
alvenos hejmen, ke mi perdis la monon, kiun Vilĉjo, mia filo, devus
kunpreni kun li al Nova Zelando! Kia stato de turmento ŝi enestos! Kaj
kiam ŝi estos fininta min demandi, kiam kaj kie mi ĝin perdis, kaj kiel mi
povis esti tiel senzorga kaj malsaĝa." Tiam mi respondos, "Ĝi bruligis
truon en mia poŝo!" "Ha! ha! kiel kolera ŝi estos, ke mi ŝercis pri tiel
grava afero! kaj kiel Vilĉjo ridegos! Sed, jen estas la vagonaro. En kia
klaso vi vojaĝas?" li diris al mi.

"La dua," mi respondis.

"Nu, mi do diros al vi adiaŭ, ĉar mi ĉiam vojaĝas en la unua. Ĉe mia


tempo de vivo, mi trovas, ke mi devas doni al miaj maljunaj ostoj kiel
eble plej multe da ripozo!"

Mi tiom amuziĝis je la stranga maljunulo, ke mi diris: "Ho! ne. Mi


kunvojaĝos kun vi, kaj pagos la kostdiferencon en Brighton."

"Mi ne volas ke vi elpezu monon miakaŭze," li respondis.

"Ho! ne signifas," mi diris, "estos nur bagatelo." Mi do lin sekvis en


unuaklasan kupeon, kiu estis neokupata.

La portisto enmetis la paketojn; mi diris adiaŭ al mia frato kaj sidigis min
en angulo de la kupeo kontraŭ la maljuna sinjoro, kaj ni forveturis.

ĈAPITRO II.

Kaj nun, dum la vagonaro forrapidegas al Brighton, permesu al mi diri


malmultajn vortojn pri mia familio kaj mi mem.

Mia patro, maljuna generala oficiro, estis mortinta antaŭ kelkaj jaroj.
Post lia morto, mia patrino, kiu havis nur sian vidvinan pension kaj
proksimume centlivrojn ĉiujare, loĝis en Brighton, por pli ekonomie
eduki miajn du fratinojn, unu el kiuj estis nun plenkreska, kaj la alia ĉe
lernejo en la urbo. Mia pli maljuna kaj sola frato, Karlos, de kiu mi ĵus
disiĝis ĉe la stacidomo, estis, antaŭ ne longe, tininta aranĝi siajn
vespermanĝojn[1] ĉe la Inner Temple (leĝa kolegio), kaj nun kredis sin
plene sur vojo al elokventeca gloro!

Pri mi mem, ĝi estu mallonge dirita, ke mi estis, antaŭ kelkaj monatoj,


preninta mian B.A. gradon ĉe Cambridge. Unue mi estis difinita por la
leĝoscienco, sed militama fervoro, nedube heridita de mia patro,
kontraŭkuris la dezirojn de mia patrino, kaj mi malfacile ricevis ŝian
konsenton ŝanĝi la robon por la glavo. Pro tiu ĉi celo, mi iris Londonon
por prezenti min antaŭ komitato de eminentaj militkuracistoj ĉe
Whitehall. Fiera pri miaj atletaj faroj en la universitato, mi uzas la
okazon por diri al la tri gravaj eminentuloj, kiam ili demandis min pri mia
sano, ke mi kredas ke ne estu multe da timo ke mi havu ian korpan
malsanon, ĉar mi remis en la boato kiu estis "ĉefo de la rivero" lastan
Majon ĉe Cambridge, kaj ankaŭ, ĉe Henley, en Julio gagnis diversajn
boato-konkurojn. Miasurprize, ili min sciigis, ke tiaokaze, ili devas fari tre
zorgan ekzamenon, ĉar atletaj sinjoroj ofte ne estas tiel sanaj, spire kaj
membre, kiel ili mem imagas. Tial, anstataŭ supraĵa ekzameno, kiun mi
atendis, me devis suferi severan provon. Oni igis min senvestigi, salti
super benkojn, salteti jen per unu piedo, jen per la alia; mi devis legi
per unu okulo, tiam per la alia; miaj dentoj, pulmoj, kruroj, brakoj,
oreloj, manoj, piedoj, fakte mia tuta korpo estis zorgege ekzamenata,
ĝis kiam mi ekpensis, ke mi estas ĉevalo vendota sub la serĉaj okuloj de
bestokuracisto! Tamen, fine mi estis certigata bonsana kaj konvena
aspiranto por pulvo kaj kuglo.

Lasante Whitehall, mia militfervoro estis neniel estingata; ĉar mi tuj


tutĝoje marŝis al la Temple (leĝkolegio); allogis mian fraton de lia Coke
upon Littleton (leĝlibro), por ke li venu kun mi aĉeti turn-pafileton.
Aĉetinte tiun ĉi, mi ordonis al la armilfaristo ke li sendu ĝin al la
Grosvenor Hotelo, adresita al Sinjoro Georgo Middleton; kaj tiam, tial ke
mia frato estas tro okupa por veni kun mi al mia tajloro, ni disiĝis, li
promesante, ke li vespermanĝos kun mi en la hotelo je la sepa.

Je la sepa mia frato alvenis, kaj ni sidiĝis ĉe tablo en la manĝoĉambro.


Apude estis malgranda maljuna sinjoro, kiu, post kelkaj rimarkoj pri la
vetero, varmeco de la ĉambro, kaj cetere, demandis ĉu li povas unuiĝi
kun ni. Ni volonte konsentis, kaj li sidiĝis ĉe nia tablo.

Li gajigis nin multe per siaj mallongaj lertaj skizoj de vivo kaj karaktero
en preskaŭ ĉiu parto de la mondo. Evidente li estis homo kiu estis
multege vojaĝinta, kaj ne estis forgesinta tion, kion li vidis. Tio ĉi, kune
kun la iom kurioza, sagaca modo per kiu li rakontis siajn spertojn, igis lin
plej agrabla kunulo, kaj mi multe ĝojis, kiam mi ektrovis ke ni estas
vojaĝontaj al Brighton en sama vagonaro. Kaj nune, jen estas ni ambaŭ
rapide forveturantaj po kvindek mejloj la horon al nia celo.

(Daŭrigota).

PIEDNOTO:

[1] Antaŭe, membro de universitato, post


kiam li ricevis la gradon B.A. (Baccaloreus
Artium), povis fariĝi advokato, sen plua
ekzameno, se li varbis sin kiel membro de
unu el la leĝaj kolegioj, kaj ĉeestis ĉe ne
malpli ol kvar vespermanĝoj en la salono
de sia kolegio. Tion ĉi oni nomis "manĝi
vespermanĝojn."

PINO.

El Hejne-Lermontov.

En nordo sovaĝa, sur nuda supraĵo


Balancas sin sola la pin’,
Kaj dormas, vestita en neĝ’ ŝutiĝanta,
Kaj revas pri sia fratin’.
Ŝi sonĝas, ke ploras sur monta krutaĵo,
En lando de suna surir’,
En fremda dezerto kun sablo brulanta,
La palmo belega je mir’.
Vs. Lojko.

ERMITO PRESKAŬ MODERNA.

Originale verkita de E.W.

Mi vizitis onklon kiu loĝis sur monteto apud kies piedo kuŝas la
marborda urbeto, Cromarty. Unu tagon alvenis la pastro de la proksima
Libera preĝejo. Li nin sciigis ke li ĵus venis de interparolado kun viro la
plej spirita el ĉiuj liaj konatoj, la ermito de Navity. Mia onklo tiun ĉi ne
konis, kaj respondante al liaj demandoj, Sro Stuart diris ke estis solulo
kiu antaŭ dekkvin jaroj venis al stepo dezerta kaj konstruis budon apud
sankta fonto kie antikve multe da malsanuloj mirakle kuraciĝis. Tie li
vivadis sola, manĝante nur la kreskaĵojn el lia peco da tero, trinkante
nur akvon portante somere kaj vintre maldikan eluzitan militan
uniformon multe flikitan. Ĉiun dimanĉon li venis al la preĝejo,
malproksima de 4-5 mejloj de sia budo, religie kantis kaj atente
aŭskultis la Diservon. Ĉiam li metis en la kolektujon (por vidvinoj kaj
georfoj) arĝentan moneron, sed neniam li elparolis vorton. Al viroj lin
adresantaj li respondis per saluto milita, al virinoj li ja ne mem
ekrigardis, kvankam multaj el tiuj ĉi, bonkoraj kaj kompataj penis
konatiĝi kun viro tiel stranga, tiel sola. Dum preskaŭ dekdu jaroj la
Cromarty anoj pli malpli lin respektegis, ili havis antikvan tradicion ke la
granda juĝo de vivantoj kaj mortintoj okazos meze la dek naŭan
centjaron sur la stepo de Navity. Ili do kredis ke li devas esti sanktulo
treege avida vidi kaj bonveni sian Savinton. Poste ilia opinio pri li multe
ŝanĝiĝis.
Kelkaj bovinoj mortis, multaj ĉevaloj lamiĝis, iuj riveretoj sekiĝis kaj
preteririnte lian loĝejon oni vidis fumon supreniri el lia tegmento, oni
aŭdis strangajn voĉojn kunparoladi. Tro certe estis ke li kunulo estas de
la Diablo; iuj eĉ diris ke peko mortiga estus permesi al sorĉisto pli
longan vivadon en lando Kristana.

La afero fariĝis gravega kaj la pastro sin kredis devigita sin intermeti. Li
iris ĉe la ermito. Oftege li jam frapis al la malalta pordo, oftege li
petegis, vane petegis, vorton de respondo, iafoje li tie longatempe
restis, ĉar li rigardis la malfeliĉulon kiel ŝafo el sia zorgitaro. Tiun ĉi
tagon li tuj invitiĝis eniri kaj vidis du fratojn. Robbie la nove alveninto
kuŝas sur la tero febrofrapita kaj silenta. Sro Stuart aŭdis ilian simplan
historion. La ermito lasis la militistaron post 20 jaroj da servado
alportante atestojn de bon-konduto kune kun bona saneco kaj pensio
kiun li ĉiu monate ricevas ĉe la ĉefurbo de la apuda graflando. Robbie
estis plektisto ĝis sunfrapo kaj kordoloro pri la morto de lia edzino lin
malsaĝigis. Li estas neniam danĝera nur simpla kaj ĉiam melankolia. La
pastro kaj la ermito fariĝis preskaŭ amikoj, sed ilia interrilato estas
severe limigita al interŝanĝo de libroj kaj al ne oftaj kunvenoj (vizitaj) ĉe
la fratoj.

Aŭdinte tiun ĉi rakonton mi multe deziris konatiĝi kun viro tiel aparta
kiu, vivante en klimato malvarma, preskaŭ tute sin rifuzis fajron kaj
aĉetis nur librojn. Sro Stuart diris ke estas neeble ke mi lin vidos ekster
la preĝejo, ĉar vidante virinon alvenante ĉe li, rapide li forkuros.

Hontema mi konfesas ke mi tiam ne ankoraŭ postvivis la sensencan


ambicion venki malfacilaĵojn kaj kontraŭadon. Mi decidis viziti la ermiton
kaj mia bona onklo, kiu neniam al mi ion rifuzis, min kondukis al stepo
ĉe Darnie. Mi haltis post arboreto, la sola sur tuta la stepo, li frapis la
pordon, vidis la ermiton kaj diris "Volu aminde montri al mi la sanktan
fonton" kiam mi vidiĝis li aldonis "al mi kaj al mia nevino kiu venis el
Anglujo." Silente Darnie marŝis antaŭ ni ĝis la bordo de la valeto, tiam li
sin turnis, dirante "Kolonelo, ĉu la nobla fraŭlino volas teni mian manon?
La vojo estas ja krutega." Mi metis mian maldekstran manon en la lian
kiu estas tiel glacia ke mi min promesis neniam ree marŝi manenmano
kun ermito; baldaŭ ĝis al kubuto mia brako rigidiĝis per la malvarmeco.
Kiam ni la tuton vidis kaj la deklivon supreniris, li diris "Kolonelo, la
fraŭlino ŝajnas tre laca, eble estus bone ke ŝi sin ripozus ĉe mi." Ni eniris
en la budo kiu estis peceto da tero enfermita per torfmuroj, kun
tegmento de branĉetoj, torfo kaj eriko. Ĝi havis nek fenestron nek
kamentubon nur truon en la muro por eniro de la lumo kaj truon en la
tegmento por eliro de la fumo. Anstataŭ tablo staris sur kvar ŝtonoj
granda kesto, du skabeloj plenigis la meblon. Robbie sidis sur la tero
apud fajro de torfo seka kaj abilignetoj varmiganta siajn longajn palajn
manojn. Kun li aŭ plivere al li parolis mia onklo dum Darnie al mi montris
siajn librojn. En la keston, falditajn en tuko nepenetrebla mi vidis Biblion
kun komentario, en kvar volumegoj, la "paradizo perdita" de Milton, ses
volumojn de la verkoj de Shakespeare kaj ĉirkaŭe dekduon da aliaj libroj
bele binditaj. Li tuŝis siajn librojn kvazaŭ kun adorado. Poste li montris al
ni la kreskaĵojn en sia ĝardeno, disrompis la solan rozon de la sola
rozujo kaj ĝin donis al mi dirante "Neniam ni revidos la unu la alian."
Hejme vespere mia onklo multe ridis pri nia eksplorado, li skandalegis
mian bo-onklinon per opinio ke "Darnie sin trovante (malsimile al Santo
Dunstano kaj Sto Antonio) neproviza je ruĝvarmega prenilo, provis
favorigi la Diablon per flora donaco." Estas li kaj ne ŝi kiu unue volis scii
kial viro inteligenta tiamaniere vivadas. Ili demandis al pastro, kiu diris
ke vane li mem penis eltrovi la kaŭzon sed li certege kredas ke ĝi ne
estas malbona nek malhonora. Post du aŭ tri semajnoj ni promenis kun
du sinjorinoj kaj du knaboj. Amiko pruntis por uzo de tiuj ĉi, ĉevaleton
kiu ne plu estas sufiĉe granda por porti liajn plenaĝajn filojn.
Malbonŝance la besto estis longatempe senlabora kaj fariĝis tro petola;
ĝi forĵetis unu knabon, kuŝiĝis sub la duan, ruliĝis sur la tero, kaj kiam
oni ĝin devigis stari ĝi piedfrapis, dancis sur la postaj kruroj, kaj penis
mordi. Estas do necese ĝin venki se oni iam farus uzon el ĝin. Mia onklo
estanta tro multepesa por cevaleto, kaj lia edzino ne povante sen
malrespekto forlasi ŝiajn gastinojn mi havis la plezuran aferon.

Mia onklo alttenis unu el ĝiaj antaŭpiedoj dum mi rampis sur la selon kaj
ni rapide forkuris. Mi tute ne povis kontroli la beston ekscititan ĉar mi
nur malfacile povis min balanci sur la selo kies piedingaj rimenoj estis
tro mallongaj por ke mi povu ilin uzi; tial mi sen sinriproĉo ĝuis la
galopon, ĝis mi subite min trovis sur la herbo. Mi falis kiel kato sur la
piedoj kaj ankoraŭ mi tenis la kondukilojn, tial mi deturnis la ĉevaleton
al arboreto, kie mi disrompis branĉeton kovritan per folioj. Neniam mi
frapis bestojn sed iafoje mi tiklis ilian nazon aŭ orelojn por sciigi ilin ke
mi ĉeestas aŭ por ilin vekigi se ili estas dormemaj. Mi ne deziris duan
falon kaj mi estas certa nenion renkonti mi do sidiĝis sur la selon tiel kiel
rajdis la kamparaninoj en Kimrujo kiujn mi ĉiutage vidis en mia infaneco.
Tiam mi incitis la beston al plej rapida kuro kaj kiam ajn ĝi volis marŝi mi
tremigis la foliojn apud ĝia kapo tial ke ĝi rekomencis galopon. Kiam ĝi
ŝajnis sufiĉe laca por ke ĝi min obeu mi cirkaŭrigardis kaj min trovis en
plena dezerto, sen vojeto kaj sen ia ideo pri la sido de la urbeto. Vere la
besto facile trovus ĝian hejmon sed ĝi irus ĉe ĝia propra mastro kaj ne
ĉe miaj geonkloj. Dum mi haltis duba mi vidis viron, mi do movinte mian
dekstran piedon al mia maldekstra flanko lin sekvis, lin alvokis kaj kiam li
sin turnis mi lin petis al mi helpi premi la selligilojn kaj montri la plej
rektan vojon al Cromarty House. Li nenion respondis sed ŝanĝis la
bukojn kaj prenis la bridon.

Mi diris "Volu montri per fingro kie kuŝas la urbeto; ne estas necese ke
vi min akompanu."

"Estas ja necese, multaj kaj profundaj estas la marĉoj," respondis voĉon


per kies sono mi rekonis Darnie. Mi decidis respekti liajn kutimojn, sed
baldaŭ, tute senvole mi ekkriis "Darnie, kial vi tiel strange vivadas?" Lian
vizagon mi ne povis vidi, lian voĉon tamen estis kvieta kiam li enfine
diris "Mizerulo ne devas enui noblan fraŭlinon." "Vi ne estas Mizerulo, mi
ne estas nobla. Unu estas nia patro, Dio mem; kaj ni ĉiuj estas gefratoj.
Ĉu vi tion ĉi ne legis el via Biblio? Ĉu vi ĝin ne kredas? Kial vi ne
konfidus en fratino?"

Post longa silento li komencis paroli tre malfacile ĉar la Angla lingvo al li
estis lingvo alilanda, li rakontis al mi ke liaj prapatroj kulturis farmojn en
bela valo. Li estis la plej juna el ok gefiloj kaj estis nur dekokjara kiam
oni faris fervoran alvokon al la patriotismo de la Skotoj por defendi la
landon kontraŭ Bonaparte kaj li soldatiĝis: post deksep jaroj li estis
serĝento kaj ricevis longan libertempon. Revidante sian familion li trovis
plenan feliĉecon. Gepatroj gefratoj, geonkloj, gekuzoj, estis sanaj kaj
prosperaj, liaj fratinoj estis ĝojaj edzinoj kaj patrinoj; bona knabino kiun
li de ŝia infaneco amis lin feliĉege bonvenis. Ili fianĉiĝis, post nur tri
jaroj, lia deĵoro elfarita li revenos, libera, riĉa al la kara valo, al la karega
virino, por ĝui inter iliaj parencoj vivon paradizan.
La tri jaroj pasis, de Hindujo li rapidis hejmen kaj trovis la valon sed de
la vilaĝo nur fajrenigrigitajn ruinojn. Li marŝis longatempe antaŭ ol trovi
dometon kies timigitaj loĝantoj lin diris ke ĉiuj vilaĝanoj forpeliĝis por ke
la bienulo obtenu plian luprezon el riĉaj ŝaffarmaj mastroj. Li iris al
pastra domo kie li bonege riceviĝis sed la pastro povis al li nenion sciigi
pri liaj parencoj. El la 350-400 loĝantoj, kelkaj iris Amerikon, kelkaj
(surtute teksistoj) migris en la urbojn kelkaj mortis pro malvarmo,
malsato kaj melankolio. La pastro diris al Darnie ke li devas akcepti siajn
malĝojigojn tiel justa dia puno pro liaj eblaj formetitaj ŝuldoj de preĝo.
Ankaŭ li promesis lin sciigi se iam venas al valo iu el liaj parencoj.
Lasinte la valon Darnie renkontis amikino kiu lin diris ke la forpeloj
kruelege efektiviĝis. Ŝi vidis lian patron svenigitan per ŝtonbatoj, lian
patrinon devigeble eltrenitan el lito kaj forĵetitan sur malsekan herbon;
tie post nokto mizera ŝi mortis. Dum kelkaj semajnoj Darnie ĉirkaŭe
vagis, penante trovi iajn sciigojn pri sia familio aŭ pri la familio de sia
fianĉino, lasante ĉie la adreson de la oficejo al kie li iros por sia pensio.
Enfine li loĝiĝis al Navity kie post dekdu jaroj li aŭdis pri sia frato.

Al mi demandinte kial li elektis restadejon tiel dezertan li respondis "Ĉar


mi timegis fariĝi mortiganto, ju pli mi aŭdis pri la suferoj de miaj popoloj
des pli mi deziregis venĝon. Mi ne kuraĝis min meti en tentado se mi....
Tiun riĉulo mi ne povos pardoni. Mi volis pardoni por ke mi estu apud
mia amatino al la mano dekstra de Dio—tie mi ne estos ĉar mi neniam
pardonos, sed ŝi scios ke mi ŝin iam amegis, al ŝi ĉiam mi restis fidela."

"Unu tagon vi ja pardonos Darnie."

"Neeble, mi jam forgesis. Mi jam estas kvazaŭ mortinto ne sentante.


Dum longaj jaroj mi preĝis povi pardoni, tutajn noktojn mi staris sur la
genuoj aŭ kuŝis sur la vizaĝo preĝante povi pardoni—nun mi ne povas
plu preĝi." Li pli multon diris sed mi ne aŭskultis: mi pensis kaj preĝis.
La domo estante videbla mi diris, "Adiaŭ frato mia, iru hejmen kontenta.
Dio vin ja longe pardonis, ĉar li vin amis, eterne. Li vin amos."

Je la unua fojo li altlevis la okulojn kaj min regardis "Adiaŭ, fraŭlino, ĉu


vi estas vere fraŭlino aŭ anĝelo sendita de Dio?"
P.S.—Dum dekok jaroj mi neniam parolis pri Darnie ĉar mi timis perfidi
lian konfidencon. Tiam lin kredante morta mi rakontis lian historion al
amiko mia; nun mi ĝin skribis.

E.W.

LA HISPANA ARMŜIPARO.

De Lord Macaulay, tradukita de Ben Elmy.

Atentu, se sciiĝus vi pri Angla la virec’;


Mi kantas kion faris ĝi en fama l’ estintec’;
Ŝiparo vane kontraŭ ĝi alportis, sur marflu’,
Meksikan oron, bravajn korojn, for el Hispanuj’.

Jen estis dolĉa tagfiniĝ’ en suna la somer’,


Ŝip’ Angla flugis al haven’ de la Devon’a ter’;
Tagiĝe jam ekvidis ĝi, sur la Aŭrinja mar’,
Grandegajn nigrajn ŝipojn el Hispana la ŝipar’;
Ĝi ilin ekevitis ĉe la frua sunleviĝ’,
Sed poste, ĝis la tagomez’ daŭradis la ĉasiĝ’.
Tuj ĉia urba pafileg’ metiĝis sub gvardi’,
Ekflamis tuj signalofajr’ de l’ alta bateri’;
Forflugis multaj fiŝbarketoj serĉi pri l’ afer’,
Kun sanga sprono rajdis for tre multa kurier’.
L’ urbestro, griza maljunul’, almarŝas en mezur’,
Kun halebardanaro, kaj batado de tambur’;
Ĉar en la plac’ la hejmgardistoj jam kolektis sin,
Starigi tie, laŭ komand’, standardon de l’ reĝin’;
Fiere sonas la trompet’, kaj dancas sonoril’,
Dum malfaldiĝas per la vent’, la reĝa blazonil’;
Leon’ herolda de la mar’, antikva kun kroneg’,
Liliojn, jen, trabatas ĝi per forta piedeg’.
Tiele alpaŝadis ĝi, ĉe l’ kamp’ de Pikardi’,
Al agloŝild’ Cezara, al plumar’ de Bohemi’;
Tiele elrigardis kiam, apud Aĝinkort’,
La ĝin ĉasantajn princojn ĝi oferis al la mort’.
Salutu flagon, knab’! Alĵetu florojn, ho knabin’!
Ektondru pafilegoj, inde reverenci ĝin!
Ho suno, allumigu ĝin, per tuta brilo via!
La glora "Ĉiamsama," la standard’ fiera nia!

En vent’ vespera svingas sin la peza riĉa flag’,


Ekbrilas ĝia oro en la lasta lum’ de l’ tag’;
Kuŝiĝas nun la suno, tuj alvenas nokto, kia
Neniam en Anglujo estis, nek revenos tia.
De Ediŝtono ĝis Bervik’, Linreĝa ĝis Milford’,
Okupe estis, kvazaŭ tag’, en tuta l’ Angla bord’;
Jen la signaloflam’, de l’ orient’ ĝis okcident’,
Sur Mont’ Miĥala brulas, kaj sur Kap’ de l’ Orient’.
Hispanoj, do, ekvidas nun sur ĉia promontor’,
Fajreron briletantan kiel pint’ de viva or’.
Fiŝist’ boaton lasis sur la ondoj de Tamar’,
Ministoj alvenadis el Mendip’a kavernar’;
Signal’ vidiĝis trans arbar’, kaj trans herbejo, ĉe
Paŝtistoj de Stonhenĝo, kaj ĉasistoj de Bolej’;
La tutan nokton en Bristol’ batadis sonoril’,
Tricent rajdantoj venis, kun ĉevaloj kaj armil’.
Gardostarant’ ĉe Blankdomeg’ ekvidis tra l’ mallum’,
Super monteto de Riĉmond’, iom da ruĝa fum’;
Eksonis tuj trompeto, tuj bruegis pafileg’,
Tuj, eksaltante je koler’, vekiĝis reĝurbeg’;
Tuj reciproke flamas fajr’ sur urbpordego ĉia,
Tuj sonoril’ al viglo vokas per ordono ĝia;
La bateri’ de l’ Tur’ tondrigas veton de batal’,
Milo da ŝipoj sur la Temz’ aplaŭdas al signal’;
El ĉia part’ audiĝas nun pieda peza bat’,
Je flagoj kaj pikstangoj tuj pleniĝas ĉia strat’;
Kaj pli kreskadis nun la flam’, pli laŭta estis bru’,
Dum el proksima kamp’ plimultiĝadis homoflu’;
Trans Nigrastepo orienten flugis la alvok’,
Al multa Kent’a estro en antikva hejmolok’;
Kaj suden rajdis kurier’ trans Temz’a dolĉa bord’,
Kaj de Hamsted’a erikej’ galopis al la nord’;
Kaj for, je l’ tuta nokt’, sen paŭz’ daŭradis la kurad’,
De mont’ al mont’, de tur’ al tur’, senĉesa eksaltad’;
Ĝis staris la standardo sur la Pik’a kruta front’,
Kaj ĝis vulkane brulis ĉia alta Kimra mont’;
Ĝis dek provincoj vidis jam flamegon sur Malvern’,
Ĝis la Wrekin’ ekŝajnis nur sangruĝa nubostern’;
Ĝis kreskis brilo sur l’ Eli’a sankta konstruaĵ’,
Kaj ĉia urbo armis sin en larĝa l’ ebenaĵ’;
Al Linko rapidiĝis de Belvero la signal’,
Kaj Linko tuj forsendis ĝin trans Trent’a vasta val’;
Ĝis ĉe Skidaw’ vidiĝis fajr’ sur Lank’a la kastel’,
Kaj ruĝo sur Skidaw’ ekvekis burĝojn de Karlel’.

IOMETO DA MUZIKO.

Tradukita de Alfred J. Hulme (Esp. 8688).

El "Dan Leno His Book" (Dan Leno estis la Rega Amuzisto).

Mi estas pleje memedukita viro, kaj mi estas baraktinta kun ĉiu el la


artoj kaj sciencoj en "broŝura" maniero. Sed dum la tuta kurso de mia
studado mi neniam havis tian ekscitan tempon kian tiam kiam mi provis
plene majstrumi la sakfajfilon per sep lecionoj sen helpo de instruisto.

Mi ne precipe amis tiun muzikilon, kaj mi pensas ke mi komprenas kial ĝi


malofte ludiĝas ĉe simfoniaj koncertoj. Sed mi havis sorbegan sciamon
eltrovi ĉu mi povos fari kortuŝantan efekton porke blekante per ĝi la
"Preĝon de virgulino." Mi antaŭpensis ke ĝi estos la plej kortuŝa muzika
efekto iam konata.
Mia tiatempa pensiistino estis bonenutrita ino, sed ŝi ne havis orelon; ŝi
devis aŭskulti tra sia nazo, kaj kompreneble tiu malfacilo igas al ŝi
antaŭjuĝon kontraŭ klasika muziko. Mia unua atenco estis ektremiga. Mi
estis ferminta la pordon kaj preninta grandan buŝplenon da la tuboj, kaj
elblovinte ĝis miaj dentoj preskaŭ elfalis, mi sukcesis plenigi la sakon aŭ
ventujon per kvanto da sudokcidenta vento.

Okazis nenio dum kelkaj momentoj; sed ĵus kiam mi estis spireganta kaj
sopiranta antaŭ rekomenci, tiam la ilo ŝajne vekiĝis subite pro sento pri
ĝiaj ĉirkaŭaĵoj, kaj komencis kriegadon, ploregadon, kaj kraĉadon. Ĝi
sonis kiel tridek katoj kun iliaj vostoj en rulpremmaŝino de lavisto.
Timigita, mi lasis fali la estaĵon kaj forkuris el la ĉambron. Sur la etaĝo
mi ekrenkontis mian pensiistinon, kiu brake karesis min, mole kisante
min ĉe la frunto, demandis "Ĉu la doloro estas kie?" Kaj informis ke "ŝia
mortinta edzo foje suferis same, sed ŝi konjektas ke li neniam havis ĝin
tiel malbone kiel mi."

La loĝanto supre mi juna viro estis forta kaj kutime malagrabla kanajlo,
sed je tiu-ĉi okazo li ĝentiliĝis kaj sendis depeŝon peti "Ĉu Sinjoro Leno
kompleze ĉesos kantadon, ĉar li deziris dormi."

Je la okazo de mia dua leciono, mi komencis praktiki en mia


dormĉambro antaŭ frumatenmanĝo, kaj mi ekvidis tra la fenestro karan
multepezan amikon mian. Li estis proksimiĝanta por inviti lin mem al
matenmanĝo.

Mi treege blovis en la aerujon, kaj tuj metis la sakfajfilon sub la littukaro


kaj atendis mian vizitonton.

"Ho! maljuna viro," ekdiris la kora gasto,—"ĉu, jam vi leviĝis? Ĉu, plu da
studado? Ne zorgu pri seĝo, mi sidiĝos sur la lavtablon."

Tia ne estis tio kion mi deziris, tial mi tuj malsekigis la lavtablon per
ŝajne mallerte renversante iom da akvon.

"Nu, do, mi sidiĝos sur la liton," li kriis. Li sidigis sur la liton—faliĝis sur
ĝin laŭ lia gajega maniero.
Mia sakfajfilo noble konvenis la okazon. Ju frue la dorso de mia amiko
kontaktiĝis je la lito, des frue ekverŝiĝis sangorigidaj ĝemegoj kaj kriegoj
el sub la littukaro.

Ĝi vere estis terura bruo kiu haltigis eĉ mian koron. Mia amiko eksaltegis
al tia alto ke li frapigis sian kapon kontraŭ la plafono. Lia hararo rekte
stariĝis; liaj dentoj kraketis; liaj ĝenuoj kunfrapis.

"Bona Dio! Dan!" li babilis. "Mi plej evidente estas mortiginta la infanon."

Mi neniam dum mia vivado vidis tian pentraĵon de tragedia terurego.


Subite li verŝajne reatingis la uzon de liaj membroj; li ekmalfermis la
pordon kaj sovaĝe kuregis straton. Mi vokis al li tra la fenestro. Mi diris,
"Nenia profito estas forkuri; ni devas vizaĝe kontraŭstari tiun-ĉi
malfeliĉon kaj decidi tion kion ni faros. Tuj supreniru. Se popoloj vidos
vin tiamaniere agi, ili eksuspektos ion."

Tial li treme revenis, kaj mi serioze komencis diskuti kune kun li pri la
konsilindeco ĉu kaŝi subplanken la korpon, kaj poste elmigri Venezuelon.

Lia vizaĝo kovriĝis per la manoj, kaj li ŝajne konfuzegiĝis pro la penso ke
lia sorto estas tute defektita. Fine li leviĝis, kun trankvila decido sur la
vizaĝo. Li apudiris la liton kaj dolĉe tuŝis la kovrilon.

La fajfilo eksonigis kuriozan sopireton. "Dan," ploretis mia multepeza


amiko, "ĝi ankoraŭ vivas! ĝi ja ankoraŭ vivas! Tiam li forturnis la
littukojn."

Faligu la kurtenon!

FRAGMENTAJ MEMOROJ.

Originale verkita de Edward Metcalfe, M.A. (Oxon).


La aŭtoro rizervas ĉiajn rajtojn.

Ankoraŭ mi ne diris ion pri afero kiu en la Ŝtatoj estas tute ordinara; la
movigo de domoj.

Por ni Angloj estas ofte malfacile kontentigi nin: aŭ ni ŝatas domon kaj
malŝatas ĝian siton, aŭ, kontraŭe, ni trovas konvenegan siton, kaj, jen,
la domo, kiu staras sur ĝi, estas tute ne dezirinda; eĉ eble ne estas
domo.

Sed por Amerikano la afero estas multe pli simpla. Li vidas konvenan
domon kaj aĉetas gin. Se poste li vidas siton, kiu ŝajnas al li preferinda,
li ankaŭ aĉetas ĝin. Tiam li metas sian domon sur translokigilojn kaj
translokigas ĝin sur la novan siton. Li ne ĝenas sin pro la pakado de sia
meblaro. Tiel lertaj estas la translokigistoj ke ne eĉ pentraĵo defalos de
la muroj dum la translokigo.

Mi ne diras ke neniam okazas malfeliĉo, car okaze—sed mi rakontos tion


kion mi vidis.

Foje promenante en urbon kiun ni nomos New York, mi forlasis la


grandajn ŝtonajn konstruaĵojn kaj eniris straton de lignaj dometoj. Se
ĝuste mi memoras ili estas apartaj, kaj havis ĝardenetojn kiuj tre similis
al verdaj tablotukoj kun bordoj florigitaj.

El tiuj ĉi dometoj unu staris tute malrekte, tiel kiel se infaneto de iu el la


antikvaj grandeguloj, ludante je siaj ludiloj, kiam li metis tiun ludilon sur
sian naztuketon verdan, dum unu momento estus restinta kontraŭ ĝi la
manon, kaj tion tuj ekvidinte estus formovinta la pezon antaŭ tute
premegi la domon.

Nature tiu ĉi strangaĵo vekigis mian sciamon, kaj mi informiĝis pri la


kaŭzo de tia malrektiĝo.

Sed por bone komprenigi la aferon mi devas unue klarigi kiamaniere


Ameriko altigas sian domon.

Li ĝuste "mal"-as nian Anglan metodon. Ĉe ni oni formetas la tegmenton


kaj aldonas supran etaĝon. Ameriko, kontraŭe, altigas per altigiloj la
tutan domon kaj sub ĝi konstruas malsupran etaĝon.

Nu; mia informanto diris al mi ke en la domo plej apude al tiu kiun mi


rimarkas loĝis domkonstruisto, kaj en la kapon de tiu domkonstruisto
venis la ideo altigi sian domon. Sed, ĉar li estis kredeble iom ŝparemulo
li decidis ke li ne dungos istajn laboristojn, sed ĉion faros per siaj propraj
salajruloj kaj iloj.

Ili vere sukcesis altlevi la domon, sed (aŭ ĉar li ne bone komprenis la
aferon, aŭ ĉar li ne havis sufiĉon da homoj aŭ iloj), kelkaparte la
subportiloj rompiĝis, kaj la domo, falinta laŭ tiu direkto, falis kontraŭ
tiun domon pri kiu mi faras demandon, kaj ĝin lasis tiel kiel nun mi
vidas.

Kiel ofte mi vidas ke se Biciklanto ektuŝegas piediranton, la piediranto pli


suferas. Ankaŭ tie ĉi la domo de la domkonstruisto ne montris ian ajn
postsignon de sia aventuro. Oni legis la historion en la difektaĵo de ĝia
neofendinta najbaro.

Foje mi legis rakonton pri la altigo de hotelo ĉe San Francisco por ke


subpasu fervojo. Mi ne garantias ĉiun detalon ĉar mi rakontas de
memoro; sed tiel bone la priskribo montras la metodon kion oni uzas por
altigi domojn ke la legantaro certe min pardonos, se mi penos skribi pri
ĝi tion kion mi memoras.

Unue oni formovis kelkajn ŝtonojn kaj por ili anstataŭigis trabojn. Nature
oni formovis ĉiujn la ŝtonojn el la sama vico, kaj oni zorgis ne formovi
sufiĉon da ili por malfortigi la konstruaĵon. Kiam oni estas anstataŭ
ŝtonoj anstataŭiginta trabojn oni el la sama vico formovis aliajn ŝtonojn,
ankaŭ anstataŭiganta ilin per traboj; kaj tiamaniere oni daŭrigis ĝis kiam
la tuta konstruaĵo restis kvazaŭ sur fortega ligna kadro. Kompreneble oni
formovis la ŝtonojn samtempe el multaj lokoj sur la sama viĉo. Sub tiu
kadrego oni metis aregon de turnleviloj, kaj ĉe ĉiu turnlevilo starigis
homon, kiu, ĉe donita signo iomete turnigos la tenilon. Oni tre zorgis ke
ĉiu el ili turnu ĝuste la saman spacon ĉe la sama momento, kaj ĉe ĉiu
movo oni altlevis la konstruaĵon, mi supozas, nur malgrandan porcion da
colo.
Tuj kiam oni estis levinta la kadregon suficon da spaco por tion permesi
aliaj laboristoj konstruis sub ĝi unu tavolon de dikega kaj fortega muro.
Pro tio, neniam estas granda interspaco inter la konstruaĵo kaj la
subkonstruaĵo. Fine, mi supozas, oni formovis la trabojn malmaniere kiel
oni unue ilin enmetis en la muron. Dum la tuta altigo gastoj manĝis kaj
dormis en la hotelo kaj, oni diras, ne sentis eĉ la plej malgrandan
skueton.

Tie ĉi mi intencis ion diri pri la hoteloj, sed tiu estas afero tro longa por
esti traktata en la fino de fragmento. Mi tial anstataŭigos por ĝi
priskribon de Dioservo kiu lasis sur mia cerbo profundegan impreson. Pri
la hoteloj mi esperas paroli en la proksima fragmento.

Ĝis nun mi ne parolis de mia akompanantino dum la pli granda porcio de


mia vojaĝo. Permesu ke mi nun prezentu al la legantaro—mian onklinon.

Ho! tiu dimanĉo; kiel ĝi estis varmega! Apenaŭ oni povis spiri, kaj en
niajn manojn mi certe atendis vidi kelkajn ventumilojn, sed tion kion mi
vidis mi tute ne atendis, eĉ ne povis atendi.

En la tuta preĝejo (kaj ĝi estis tre granda konstruaĵo) mi kredas ke la


onklino kaj mi mem estis la solaj personoj kiuj ne portis ventumilon.

Eble oni devas ankaŭ ekcepti la organiston, sed nur dum la tempo mem
kiam li ludis la organon, kaj mi ne estas certa ke iu ne ventumis lin dum
la ludado.

Ho! tiuj maltrankvilaj, maltrankviligaj ventumiloj! Ĉie en la preĝbenkoj


oni svingetis ilin; ĉiu ĥorano kaj ĥoranino svingetis ilin; dum la kantado
oni svingetis ilin; dum la preĝoj oni ankoraŭ ilin svingetis; oni ilin
svingetis dum la legado de la Sankta Biblio, kaj, kiam fine la predikisto
supreniris la tribunon por prediki, li ankaŭ portis ventumilon kaj sin
ventumadis per ĝi dum la tuta predikado.

La komenco de la prediko mi aŭdis tiamaniere:

"Miaj karaj" (ventum—li svingis la ventumilon dekstren) "fratoj" (ilo:


ventumilon maldekstren). "Mi parolos al vi" (ventum—) "hodiaŭ pri la"
(ilo) "vortoj kiujn vi" (ventum—) trovos en la (ilo), k.t.p.
Aŭskulti mi ne povis. Malgraŭ la volo miaj okuloj postsekvadis la movojn
de tiuj diversaj ventumiloj, kaj preskaŭ mi fariĝis strabulo per mia
prenado por vidi ĉiujn el ili samtempe.

Ekkaptis min freneza deziro ke oni svingu ilin ĉiu ĉe la sama momento
laŭ la sama direkto. Mi ne povis ne rigardi, mi ne povis fermi la okulojn.
Mi estis hipnotigita per ili, kaj bonege mi komprenis la koron de tiu fama
violonisto kiu subite ĉesis ludi sian amatan muzikilon, kaj alveninta al la
antaŭa flanko de la estrado tiamaniere parolis al riĉe vestita sinjorino,
kiu sidis en la unua vico de la aŭskultejo kaj trankvile ventumadis sin:
"Sinjorino, sinjorino: kiamaniere mi povas ludi la violonon en tempo 2/4,
se vi persistas vin ventumi en tempo 6/8?"

En tiu preĝejo oni sin ventumadis en ĉiuj la tempoj. Pri unu afero mi
estas nepre decidinta. Se ankoraŭ mi ĉeestos tian Dioservon, mi mem
kunprenos ventumilon.

UNIVERSALA KONGRESO EN BOULOGNE


(Aŭgusto 5–13, 1905).

Dum la 1a Universala Kongreso de Esperanto, kiu okazos proksiman


Aŭguston, sub la prezido de Dro L. Zamenhof, en Boulogne-sur-Mer,
estos organizataj vesperkunvenoj kiuj konsistos precipe el balo kaj
koncertoj.

Estas de nun necese prepari tiujn kunvenojn por ke ili havu kiel eble plej
grandan sukceson. Ni ne dubas ke se ni atingas tiun celon, ni estos
incitintaj la kuriozecon de la skeptikuloj kaj de la indiferentuloj kiuj
nepre estos tiam esperantistigotaj. Tial, tiuj festoj devas esti zorge
pripensataj kaj de longe organizataj.

Balo.—Laŭ la opinio de kelkaj Kongresontoj, ni pensis ke estus bone ke


en la balo partoprenu multaj fremduloj kun naciaj aŭ regionaj vestaĵoj.
Tiu balo estus tiel originala festo kiu elmontrus tute bone la diversecon
de la nacioj reprezentataj en la Kongreso; plie, kaj precipe, la
interkompreno per Esperanto estus pli konstatebla kaj farus gravan
impreson sur la granda amaso da libertempuloj kaj da turistoj kiuj
ĉiujare vizitas Boulogne-sur-Mer dum Aŭgusto. La balo devas do esti
fruktoplena propagandilo. Ni estas certaj ke ĉiuj gekongresontoj
komprenos la gravecon de tiu kunveno kaj ni ne scius tro insisti por ke
kiel eble plej multaj el ili skibu al ni post ne longe promesante alveni kun
naciaj, regionaj kaj variaj kostumoj. Ni estos tre dankemaj al ĉiuj kiuj
bonvolos aŭdi nian alvokon.

Koncertoj.—Alia grava punkto pri festoj kongresaj estas tiu kiu celas la
organizadon de la koncertoj. Eble okazos almenaŭ du koncertoj, nur
esperantistaj kompreneble. Ĉar ilia sukceso postulas ke la
partoprenantoj estu diverslingvaj, por pruvi ke Esperanto estas same
elparolata en ĉiuj nacioj, ni petas ĉiujn kiuj povas kanti, deklami aŭ ludi
muzikilon ke ili bonvolu:

1e Sendi al ni la tekstojn de la verkoj kiujn ili intencus prezenti;

2e Sciigi al ni kiujn tagojn ili nepre estos en Boulogne-sur-Mer.

La solvoj de tiuj demandoj tre helpus la formadon de niaj programoj.


Multegaj estu la respondoj!

Ni esperas ke tiu ĉi alvoko nia estos aŭdata en la esperantistaro kiu


venos al Kongreso kaj ni sciigas ke ni dezirus ricevi, kiel eble plej baldaŭ,
la respondojn kiuj estos adresataj al: Sro Paul Boulet, Vicsekretario de la
Grupo Esperantista, 49, Strato Louis-Duflos, Boulogne-sur-Mer (France).

LA KVAR HENRIKOJ.

Rakonto de Frédéric Soulié.—Esperantigis A. Motteau.


Oni diras ke, foje, en vespero kiam torente pluvo falis, maljunulino, kiun
ŝiaj najbaroj pensis esti sorĉistino, kaj kiu loĝis en malriĉa terdometo
meze de la arbaro Sta Germano, aŭdis frapadon ĉe la pordo: ŝi ĝin
malfermis, kaj ekvidis rajdanton kiu petis por gastiĝo. Ŝi kondukis lian
ĉevalon en garbejon kaj envenigis lin kun ŝi. Per lumo de fumiĝa lampo
ŝi juĝis ke li estis juna nobelo: la figuro elmontris junecon, la vestaĵo
nobelecon. La maljunulino ekbruligis fajron, kaj demandis "Ĉu la sinjoro
deziras ion por manĝi?" Deksesjara apetito, tute kiel samaĝa koro, estas
tre avida kaj ne tro elektema: tial, la junulo akceptis porcion da fromaĝo
kaj pano, eltiritan de pankesto, el kiu konsistis la tuta provizo de la
maljunulino. "Mi havas nenion krom tion," diris ŝi al la juna nobelo,
"dekona, reĝa, sala, helpa, kaj ceteraj impostoj nur tion lasas al mi por
prezenti al malriĉaj vojirantoj;—plue, la ĉirkaŭaj malĝentiluloj diras ke mi
estas sorĉistino dediĉita al la diablo, kaj tute konscience kaj senpune
ŝtelas la produktaĵon de mia kampo."

"Pardi," diris la juna nobelo, "se mi iam fariĝos reĝo de Francujo, mi


neniigos impostojn kaj edukigos la popolon."

"Dio vin aŭdu!" respondis la maljunulino.

La junulo alproksimiĝis la tablon por manĝi, sed tuj alia frapo al pordo
haltigis lin. La maljunulino malfermis la pordon kaj ankoraŭ ŝi vidis
rajdanton akvumitan je pluvego, kaj li simile petis por gastiĝo. Ŝi
konsentis ricevi lin, kaj kiam li envenis, li estis, kiel la unua, junulo kaj
nobelo.

"Ĉu estas vi, Henriko?" diris unu.

"Jes, Henriko," respondis la alia.

Ĉiu el ili nomiĝis Henriko. La maljunulino sciiĝis, je ilia interparolado, ke


ili partoprenis en multenombra ĉasanaro, kondukita de Reĝo Karlo IXa,
kies anojn ĵus disigis la pluvega fulmotondro.

"Ĉu, maljunulino," diris la dua, "vi ne havas ion ajn, krom tion, por doni
al mi?"

"Nenion," ŝi respondis.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like