100% found this document useful (1 vote)
2K views

Deep Learning Toolbox Getting Started Guide MATLAB The Mathworks - The ebook is ready for download with just one simple click

The document is a guide for the Deep Learning Toolbox in MATLAB, detailing its features and functionalities. It includes instructions on getting started, using deep network designer, and implementing various neural network applications. Additionally, it provides links to other MATLAB-related eBooks available for instant download.

Uploaded by

avazovfosado
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views

Deep Learning Toolbox Getting Started Guide MATLAB The Mathworks - The ebook is ready for download with just one simple click

The document is a guide for the Deep Learning Toolbox in MATLAB, detailing its features and functionalities. It includes instructions on getting started, using deep network designer, and implementing various neural network applications. Additionally, it provides links to other MATLAB-related eBooks available for instant download.

Uploaded by

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

Read Anytime Anywhere Easy Ebook Downloads at ebookmeta.

com

Deep Learning Toolbox Getting Started Guide MATLAB


The Mathworks

https://ebookmeta.com/product/deep-learning-toolbox-getting-
started-guide-matlab-the-mathworks/

OR CLICK HERE

DOWLOAD EBOOK

Visit and Get More Ebook Downloads Instantly at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

MATLAB Symbolic Math Toolbox User s Guide 2023 The


Mathworks

https://ebookmeta.com/product/matlab-symbolic-math-toolbox-user-s-
guide-2023-the-mathworks/

ebookmeta.com

Audio Toolbox User s Guide MATLAB Simulink 1st Edition


Mathworks

https://ebookmeta.com/product/audio-toolbox-user-s-guide-matlab-
simulink-1st-edition-mathworks/

ebookmeta.com

MATLAB Mathematics 1st Edition Mathworks

https://ebookmeta.com/product/matlab-mathematics-1st-edition-
mathworks/

ebookmeta.com

Guidebook for the Young Officer 2nd Edition Ltc Frank J


Caravella

https://ebookmeta.com/product/guidebook-for-the-young-officer-2nd-
edition-ltc-frank-j-caravella/

ebookmeta.com
5 000 Awesome Facts about Everything 2 2nd Edition
National Geographic Society

https://ebookmeta.com/product/5-000-awesome-facts-about-
everything-2-2nd-edition-national-geographic-society/

ebookmeta.com

Shakespeare Investigate the Bard s Influence on Today s


World 1st Edition Andi Diehn Samuel Carbaugh

https://ebookmeta.com/product/shakespeare-investigate-the-bard-s-
influence-on-today-s-world-1st-edition-andi-diehn-samuel-carbaugh/

ebookmeta.com

Survey of Operating Systems, 7th Edition Jane Holcombe

https://ebookmeta.com/product/survey-of-operating-systems-7th-edition-
jane-holcombe/

ebookmeta.com

Learning Functional Programming: Managing Code Complexity


by Thinking Functionally 1st Edition Jack Widman

https://ebookmeta.com/product/learning-functional-programming-
managing-code-complexity-by-thinking-functionally-1st-edition-jack-
widman/
ebookmeta.com

Doctor Satan A Despicable True Story of Hope Exploitation


Greed and Murder Ryan Green s True Crime 1st Edition Ryan
Green
https://ebookmeta.com/product/doctor-satan-a-despicable-true-story-of-
hope-exploitation-greed-and-murder-ryan-green-s-true-crime-1st-
edition-ryan-green/
ebookmeta.com
Calling Doctor Love Little Rock Medical 1 1st Edition
Rochelle Summers

https://ebookmeta.com/product/calling-doctor-love-little-rock-
medical-1-1st-edition-rochelle-summers/

ebookmeta.com
Deep Learning Toolbox™
Getting Started Guide

Mark Hudson Beale


Martin T. Hagan
Howard B. Demuth

R2021b
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™ Getting Started Guide
© COPYRIGHT 1992–2021 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 Tenth printing 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)
September 2020 Online only Revised for Version 14.1 (Release 2020b)
March 2021 Online only Revised for Version 14.2 (Release 2021a)
September 2021 Online only Revised for Version 14.3 (Release 2021b)
Contents

Acknowledgments

Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii

Getting Started
1
Deep Learning Toolbox Product Description . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Get Started with Deep Network Designer . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

Try Deep Learning in 10 Lines of MATLAB Code . . . . . . . . . . . . . . . . . . . 1-13

Classify Image Using Pretrained Network . . . . . . . . . . . . . . . . . . . . . . . . . 1-15

Get Started with Transfer Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17

Create Simple Image Classification Network . . . . . . . . . . . . . . . . . . . . . . 1-26

Create Simple Image Classification Network Using Deep Network


Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29

Create Simple Sequence Classification Network Using Deep Network


Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34

Shallow Networks for Pattern Recognition, Clustering and Time Series


......................................................... 1-40
Shallow Network Apps and Functions in Deep Learning Toolbox . . . . . . . 1-40
Deep Learning Toolbox Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
Shallow Neural Network Design Steps . . . . . . . . . . . . . . . . . . . . . . . . . . 1-42

Fit Data with a Shallow Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . 1-44


Defining a Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-44
Fit Data Using the Neural Net Fitting App . . . . . . . . . . . . . . . . . . . . . . . 1-44
Fit Data Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . . . . 1-53

Classify Patterns with a Shallow Neural Network . . . . . . . . . . . . . . . . . . . 1-61


Defining a Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61
Classify Patterns Using the Neural Net Pattern Recognition App . . . . . . . 1-62
Classify Patterns Using Command-Line Functions . . . . . . . . . . . . . . . . . . 1-68

v
Cluster Data with a Self-Organizing Map . . . . . . . . . . . . . . . . . . . . . . . . . 1-75
Defining a Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-75
Cluster Data Using the Neural Net Clustering App . . . . . . . . . . . . . . . . . 1-75
Cluster Data Using Command-Line Functions . . . . . . . . . . . . . . . . . . . . . 1-81

Shallow Neural Network Time-Series Prediction and Modeling . . . . . . . 1-88


Time Series Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-88
Defining a Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-89
Fit Time Series Data Using the Neural Net Time Series App . . . . . . . . . . 1-89
Fit Time Series Data Using Command-Line Functions . . . . . . . . . . . . . . . 1-97

Train Shallow Networks on CPUs and GPUs . . . . . . . . . . . . . . . . . . . . . . 1-107


Parallel Computing Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-107
Parallel CPU Workers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-107
GPU Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-108
Multiple GPU/CPU Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-108
Cluster Computing with MATLAB Parallel Server . . . . . . . . . . . . . . . . . 1-108
Load Balancing, Large Problems, and Beyond . . . . . . . . . . . . . . . . . . . . 1-109

Sample Data Sets for Shallow Neural Networks . . . . . . . . . . . . . . . . . . . 1-110

Shallow Neural Networks Glossary

vi Contents
Acknowledgments

vii
Acknowledgments

Acknowledgments
The authors would like to thank the following people:

Joe Hicklin of MathWorks for getting Howard into neural network research years ago at the
University of Idaho, for encouraging Howard and Mark to write the toolbox, for providing crucial help
in getting the first toolbox Version 1.0 out the door, for continuing to help with the toolbox in many
ways, and for being such a good friend.

Roy Lurie of MathWorks for his continued enthusiasm.

Mary Ann Freeman of MathWorks for general support and for her leadership of a great team of
people we enjoy working with.

Rakesh Kumar of MathWorks for cheerfully providing technical and practical help, encouragement,
ideas and always going the extra mile for us.

Alan LaFleur of MathWorks for facilitating our documentation work.

Stephen Vanreusel of MathWorks for help with testing.

Dan Doherty of MathWorks for marketing support and ideas.

Orlando De Jesús of Oklahoma State University for his excellent work in developing and
programming the dynamic training algorithms described in “Time Series and Dynamic Systems” and
in programming the neural network controllers described in “Neural Network Control Systems”.

Martin T. Hagan, Howard B. Demuth, and Mark Hudson Beale for permission to include various
problems, examples, and other material from Neural Network Design, January, 1996.

viii
1

Getting Started

• “Deep Learning Toolbox Product Description” on page 1-2


• “Get Started with Deep Network Designer” on page 1-3
• “Try Deep Learning in 10 Lines of MATLAB Code” on page 1-13
• “Classify Image Using Pretrained Network” on page 1-15
• “Get Started with Transfer Learning” on page 1-17
• “Create Simple Image Classification Network” on page 1-26
• “Create Simple Image Classification Network Using Deep Network Designer” on page 1-29
• “Create Simple Sequence Classification Network Using Deep Network Designer” on page 1-34
• “Shallow Networks for Pattern Recognition, Clustering and Time Series” on page 1-40
• “Fit Data with a Shallow Neural Network” on page 1-44
• “Classify Patterns with a Shallow Neural Network” on page 1-61
• “Cluster Data with a Self-Organizing Map” on page 1-75
• “Shallow Neural Network Time-Series Prediction and Modeling” on page 1-88
• “Train Shallow Networks on CPUs and GPUs” on page 1-107
• “Sample Data Sets for Shallow Neural Networks” on page 1-110
1 Getting Started

Deep Learning Toolbox Product Description


Design, train, and analyze deep learning networks

Deep Learning Toolbox provides a framework for designing and implementing deep neural networks
with algorithms, pretrained models, and apps. You can use convolutional neural networks (ConvNets,
CNNs) and long short-term memory (LSTM) networks to perform classification and regression on
image, time-series, and text data. You can build network architectures such as generative adversarial
networks (GANs) and Siamese networks using automatic differentiation, custom training loops, and
shared weights. With the Deep Network Designer app, you can design, analyze, and train networks
graphically. The Experiment Manager app helps you manage multiple deep learning experiments,
keep track of training parameters, analyze results, and compare code from different experiments. You
can visualize layer activations and graphically monitor training progress.

You can exchange models with TensorFlow™ and PyTorch through the ONNX™ format and import
models from TensorFlow-Keras and Caffe. The toolbox supports transfer learning with DarkNet-53,
ResNet-50, NASNet, SqueezeNet and many other pretrained models.

You can speed up training on a single- or multiple-GPU workstation (with Parallel Computing
Toolbox™), or scale up to clusters and clouds, including NVIDIA® GPU Cloud and Amazon EC2® GPU
instances (with MATLAB® Parallel Server™).

1-2
Get Started with Deep Network Designer

Get Started with Deep Network Designer


This example shows how to use Deep Network Designer to adapt a pretrained GoogLeNet network to
classify a new collection of images. This process is called transfer learning and is usually much faster
and easier than training a new network, because you can apply learned features to a new task using a
smaller number of training images. To prepare a network for transfer learning interactively, use Deep
Network Designer.

Extract Data for Training

In the workspace, unzip the data.

unzip('MerchData.zip');

Select a Pretrained Network

Open Deep Network Designer.

deepNetworkDesigner

Load a pretrained GoogLeNet network by selecting it from the Deep Network Designer Start Page. If
you need to download the network, then click Install to open the Add-On Explorer.

Deep Network Designer displays a zoomed-out view of the whole network. Explore the network plot.
To zoom in with the mouse, use Ctrl+scroll wheel.

1-3
1 Getting Started

Load Data Set

To load the data into Deep Network Designer, on the Data tab, click Import Data > Import Image
Data. The Import Image Data dialog box opens.

In the Data source list, select Folder. Click Browse and select the extracted MerchData folder.

The dialog box also allows you to split the validation data from within the app. Divide the data into
70% training data and 30% validation data.

Specify augmentation operations to perform on the training images. For this example, apply a random
reflection in the x-axis, a random rotation from the range [-90,90] degrees, and a random rescaling
from the range [1,2].

1-4
Get Started with Deep Network Designer

Click Import to import the data into Deep Network Designer.

Using Deep Network Designer, you can visually inspect the distribution of the training and validation
data in the Data tab. You can see that, in this example, there are five classes in the data set. You can
also view random observations from each class.

1-5
1 Getting Started

Deep Network Designer resizes the images during training to match the network input size. To view
the network input size, in the Designer tab, click the imageInputLayer. This network has an input
size of 224-by-224.

Edit Network for Transfer Learning

To retrain a pretrained network to classify new images, replace the last learnable layer and the final
classification layer with new layers adapted to the new data set. In GoogLeNet, these layers have the
names 'loss3-classifier' and 'output', respectively.

1-6
Get Started with Deep Network Designer

In the Designer tab, drag a new fullyConnectedLayer from the Layer Library onto the canvas.
Set OutputSize to the number of classes in the new data, in this example, 5.

Edit learning rates to learn faster in the new layers than in the transferred layers. Set
WeightLearnRateFactor and BiasLearnRateFactor to 10. Delete the last fully connected layer
and connect your new layer instead.

Replace the output layer. Scroll to the end of the Layer Library and drag a new
classificationLayer onto the canvas. Delete the original output layer and connect your new
layer instead.

1-7
1 Getting Started

Check Network

Check your network by clicking Analyze. The network is ready for training if Deep Learning Network
Analyzer reports zero errors.

1-8
Get Started with Deep Network Designer

Train Network

To train the network with the default settings, on the Training tab, click Train.

If you want greater control over the training, click Training Options and choose the settings to train
with. The default training options are better suited for large data sets. For small data sets, use
smaller values for the mini-batch size and the validation frequency. For more information on selecting
training options, see trainingOptions.

For this example, set InitialLearnRate to 0.0001, ValidationFrequency to 5, and MaxEpochs to


8. As there are 55 observations, set MiniBatchSize to 11 to divide the training data evenly and
ensure the whole training set is used during each epoch.

1-9
1 Getting Started

To train the network with the specified training options, click Close and then click Train.

Deep Network Designer allows you to visualize and monitor the training progress. You can then edit
the training options and retrain the network, if required.

1-10
Get Started with Deep Network Designer

Export Results from Training

To export the results from training, on the Training tab, select Export > Export Trained Network
and Results. Deep Network Designer exports the trained network as the variable
trainedNetwork_1 and the training info as the variable trainInfoStruct_1.

You can also generate MATLAB code, which recreates the network and the training options used. On
the Training tab, select Export > Generate Code for Training.

Test Trained Network

Select a new image to classify using the trained network.

I = imread("MerchDataTest.jpg");

Resize the test image to match the network input size.

I = imresize(I, [224 224]);

Classify the test image using the trained network.

[YPred,probs] = classify(trainedNetwork_1,I);
imshow(I)
label = YPred;
title(string(label) + ", " + num2str(100*max(probs),3) + "%");

1-11
1 Getting Started

For more information, including on other pretrained networks, see Deep Network Designer.

See Also
Deep Network Designer

More About
• “Create Simple Image Classification Network Using Deep Network Designer” on page 1-29
• “Build Networks with Deep Network Designer”
• “Deep Learning Tips and Tricks”
• “List of Deep Learning Layers”

1-12
Try Deep Learning in 10 Lines of MATLAB Code

Try Deep Learning in 10 Lines of MATLAB Code


This example shows how to use deep learning to identify objects on a live webcam using only 10 lines
of MATLAB code. Try the example to see how simple it is to get started with deep learning in
MATLAB.

1 Run these commands to get the downloads if needed, connect to the webcam, and get a
pretrained neural network.

camera = webcam; % Connect to the camera


net = alexnet; % Load the neural network

If you need to install the webcam and alexnet add-ons, a message from each function appears
with a link to help you download the free add-ons using Add-On Explorer. Alternatively, see Deep
Learning Toolbox Model for AlexNet Network and MATLAB Support Package for USB Webcams.

After you install Deep Learning Toolbox Model for AlexNet Network, you can use it to classify
images. AlexNet is a pretrained convolutional neural network (CNN) that has been trained on
more than a million images and can classify images into 1000 object categories (for example,
keyboard, mouse, coffee mug, pencil, and many animals).
2 Run the following code to show and classify live images. Point the webcam at an object and the
neural network reports what class of object it thinks the webcam is showing. It will keep
classifying images until you press Ctrl+C. The code resizes the image for the network using
imresize.

while true
im = snapshot(camera); % Take a picture
image(im); % Show the picture
im = imresize(im,[227 227]); % Resize the picture for alexnet
label = classify(net,im); % Classify the picture
title(char(label)); % Show the class label
drawnow
end

In this example, the network correctly classifies a coffee mug. Experiment with objects in your
surroundings to see how accurate the network is.

1-13
1 Getting Started

To watch a video of this example, see Deep Learning in 11 Lines of MATLAB Code.

To learn how to extend this example and show the probability scores of classes, see “Classify
Webcam Images Using Deep Learning”.

For next steps in deep learning, you can use the pretrained network for other tasks. Solve new
classification problems on your image data with transfer learning or feature extraction. For
examples, see “Start Deep Learning Faster Using Transfer Learning” and “Train Classifiers Using
Features Extracted from Pretrained Networks”. To try other pretrained networks, see
“Pretrained Deep Neural Networks”.

See Also
trainNetwork | trainingOptions | alexnet

More About
• “Classify Webcam Images Using Deep Learning”
• “Classify Image Using Pretrained Network” on page 1-15
• “Get Started with Transfer Learning” on page 1-17
• “Transfer Learning with Deep Network Designer”
• “Create Simple Image Classification Network” on page 1-26
• “Create Simple Sequence Classification Network Using Deep Network Designer” on page 1-34

1-14
Classify Image Using Pretrained Network

Classify Image Using Pretrained Network


This example shows how to classify an image using the pretrained deep convolutional neural network
GoogLeNet.

GoogLeNet has been trained on over a million images and can classify images into 1000 object
categories (such as keyboard, coffee mug, pencil, and many animals). The network has learned rich
feature representations for a wide range of images. The network takes an image as input, and then
outputs a label for the object in the image together with the probabilities for each of the object
categories.

Load Pretrained Network

Load the pretrained GoogLeNet network. You can also choose to load a different pretrained network
for image classification. This step requires the Deep Learning Toolbox™ Model for GoogLeNet
Network support package. If you do not have the required support packages installed, then the
software provides a download link.

net = googlenet;

Read and Resize Image

The image that you want to classify must have the same size as the input size of the network. For
GoogLeNet, the network input size is the InputSize property of the image input layer.

Read the image that you want to classify and resize it to the input size of the network. This resizing
slightly changes the aspect ratio of the image.

I = imread("peppers.png");
inputSize = net.Layers(1).InputSize;
I = imresize(I,inputSize(1:2));

Classify and Display Image

Classify and display the image with the predicted label.

label = classify(net,I);
figure
imshow(I)
title(string(label))

1-15
1 Getting Started

For a more detailed example showing how to also display the top predictions with their associated
probabilities, see “Classify Image Using GoogLeNet”.

For next steps in deep learning, you can use the pretrained network for other tasks. Solve new
classification problems on your image data with transfer learning or feature extraction. For examples,
see “Start Deep Learning Faster Using Transfer Learning” and “Train Classifiers Using Features
Extracted from Pretrained Networks”. To try other pretrained networks, see “Pretrained Deep Neural
Networks”.

References

1 Szegedy, Christian, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov,
Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. "Going deeper with convolutions."
In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1-9. 2015.
2 BVLC GoogLeNet Model. https://github.com/BVLC/caffe/tree/master/models/bvlc_googlenet

See Also
googlenet | classify | Deep Network Designer

More About
• “Classify Image Using GoogLeNet”
• “Try Deep Learning in 10 Lines of MATLAB Code” on page 1-13
• “Get Started with Transfer Learning” on page 1-17
• “Create Simple Image Classification Network Using Deep Network Designer” on page 1-29
• “Transfer Learning with Deep Network Designer”
• “Create Simple Image Classification Network” on page 1-26
• “Create Simple Sequence Classification Network Using Deep Network Designer” on page 1-34

1-16
Get Started with Transfer Learning

Get Started with Transfer Learning


This example shows how to use transfer learning to retrain SqueezeNet, a pretrained convolutional
neural network, to classify a new set of images. Try this example to see how simple it is to get started
with deep learning in MATLAB®.

Transfer learning is commonly used in deep learning applications. You can take a pretrained network
and use it as a starting point to learn a new task. Fine-tuning a network with transfer learning is
usually much faster and easier than training a network with randomly initialized weights from
scratch. You can quickly transfer learned features to a new task using a smaller number of training
images.

Extract Data

In the workspace, extract the MathWorks Merch data set. This is a small data set containing 75
images of MathWorks merchandise, belonging to five different classes (cap, cube, playing cards,
screwdriver, and torch).

unzip("MerchData.zip");

Load Pretrained Network

Open Deep Network Designer.

deepNetworkDesigner

Select SqueezeNet from the list of pretrained networks and click Open.

1-17
1 Getting Started

Deep Network Designer displays a zoomed-out view of the whole network.

1-18
Get Started with Transfer Learning

Explore the network plot. To zoom in with the mouse, use Ctrl+scroll wheel. To pan, use the arrow
keys, or hold down the scroll wheel and drag the mouse. Select a layer to view its properties.
Deselect all layers to view the network summary in the Properties pane.

Import Data

To load the data into Deep Network Designer, on the Data tab, click Import Data > Import Image
Data. The Import Image Data dialog box opens.

In the Data source list, select Folder. Click Browse and select the extracted MerchData folder.

Divide the data into 70% training data and 30% validation data.

Specify augmentation operations to perform on the training images. Data augmentation helps prevent
the network from overfitting and memorizing the exact details of the training images. For this
example, apply a random reflection in the x-axis, a random rotation from the range [-90,90] degrees,
and a random rescaling from the range [1,2].

1-19
1 Getting Started

Click Import to import the data into Deep Network Designer.

Edit Network for Transfer Learning

To retrain SqueezeNet to classify new images, replace the last 2-D convolutional layer and the final
classification layer of the network. In SqueezeNet, these layers have the names 'conv10' and
'ClassificationLayer_predictions', respectively.

On the Designer pane, drag a new convolution2dLayer onto the canvas. To match the original
convolutional layer, set FilterSize to 1,1. Edit NumFilters to be the number of classes in the
new data, in this example, 5.

Change the learning rates so that learning is faster in the new layer than in the transferred layers by
setting WeightLearnRateFactor and BiasLearnRateFactor to 10.

Delete the last 2-D convolutional layer and connect your new layer instead.

1-20
Get Started with Transfer Learning

Replace the output layer. Scroll to the end of the Layer Library and drag a new
classificationLayer onto the canvas. Delete the original output layer and connect your new
layer in its place.

1-21
1 Getting Started

Train Network

To choose the training options, select the Training tab and click Training Options. Set the initial
learn rate to a small value to slow down learning in the transferred layers. In the previous step, you
increased the learning rate factors for the 2-D convolutional layer to speed up learning in the new
final layers. This combination of learning rate settings results in fast learning only in the new layers
and slower learning in the other layers.

1-22
Get Started with Transfer Learning

For this example, set InitialLearnRate to 0.0001, ValidationFrequency to 5, MaxEpochs to 8. As


there are 55 observations, set MiniBatchSize to 11 to divide the training data evenly and ensure the
whole training set is used during each epoch.

To train the network with the specified training options, click Close and then click Train.

Deep Network Designer allows you to visualize and monitor the training progress. You can then edit
the training options and retrain the network, if required.

1-23
1 Getting Started

Export Results and Generate MATLAB Code

To export the results from training, on the Training tab, select Export > Export Trained Network
and Results. Deep Network Designer exports the trained network as the variable
trainedNetwork_1 and the training info as the variable trainInfoStruct_1.

You can also generate MATLAB code, which recreates the network and the training options used. On
the Training tab, select Export > Generate Code for Training. Examine the MATLAB code to learn
how to programmatically prepare the data for training, create the network architecture, and train the
network.

Classify New Image

Load a new image to classify using the trained network.

I = imread("MerchDataTest.jpg");

Resize the test image to match the network input size.

I = imresize(I, [227 227]);

Classify the test image using the trained network.

[YPred,probs] = classify(trainedNetwork_1,I);
imshow(I)
label = YPred;
title(string(label) + ", " + num2str(100*max(probs),3) + "%");

1-24
Get Started with Transfer Learning

References
[1] ImageNet. http://www.image-net.org

[2] Iandola, Forrest N., Song Han, Matthew W. Moskewicz, Khalid Ashraf, William J. Dally, and Kurt
Keutzer. "SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5 MB model
size." Preprint, submitted November 4, 2016. https://arxiv.org/abs/1602.07360.

[3] Iandola, Forrest N. "SqueezeNet." https://github.com/forresti/SqueezeNet.

See Also
trainNetwork | trainingOptions | squeezenet | Deep Network Designer

More About
• “Try Deep Learning in 10 Lines of MATLAB Code” on page 1-13
• “Classify Image Using Pretrained Network” on page 1-15
• “Transfer Learning with Deep Network Designer”
• “Create Simple Image Classification Network Using Deep Network Designer” on page 1-29
• “Create Simple Image Classification Network” on page 1-26
• “Create Simple Sequence Classification Network Using Deep Network Designer”

1-25
1 Getting Started

Create Simple Image Classification Network


This example shows how to create and train a simple convolutional neural network for deep learning
classification. Convolutional neural networks are essential tools for deep learning and are especially
suited for image recognition.

The example demonstrates how to:

• Load image data.


• Define the network architecture.
• Specify training options.
• Train the network.
• Predict the labels of new data and calculate the classification accuracy.

For an example showing how to interactively create and train a simple image classification network,
see “Create Simple Image Classification Network Using Deep Network Designer” on page 1-29.

Load Data

Load the digit sample data as an image datastore. The imageDatastore function automatically
labels the images based on folder names.
digitDatasetPath = fullfile(matlabroot,'toolbox','nnet','nndemos', ...
'nndatasets','DigitDataset');

imds = imageDatastore(digitDatasetPath, ...


'IncludeSubfolders',true, ...
'LabelSource','foldernames');

Divide the data into training and validation data sets, so that each category in the training set
contains 750 images, and the validation set contains the remaining images from each label.
splitEachLabel splits the image datastore into two new datastores for training and validation.
numTrainFiles = 750;
[imdsTrain,imdsValidation] = splitEachLabel(imds,numTrainFiles,'randomize');

Define Network Architecture

Define the convolutional neural network architecture. Specify the size of the images in the input layer
of the network and the number of classes in the fully connected layer before the classification layer.
Each image is 28-by-28-by-1 pixels and there are 10 classes.
inputSize = [28 28 1];
numClasses = 10;

layers = [
imageInputLayer(inputSize)
convolution2dLayer(5,20)
batchNormalizationLayer
reluLayer
fullyConnectedLayer(numClasses)
softmaxLayer
classificationLayer];

For more information about deep learning layers, see “List of Deep Learning Layers”.

1-26
Create Simple Image Classification Network

Train Network

Specify the training options and train the network.

By default, trainNetwork uses a GPU if one is available, otherwise, it uses a CPU. Training on a
GPU requires Parallel Computing Toolbox™ and a supported GPU device. For information on
supported devices, see “GPU Support by Release” (Parallel Computing Toolbox). You can also specify
the execution environment by using the 'ExecutionEnvironment' name-value pair argument of
trainingOptions.

options = trainingOptions('sgdm', ...


'MaxEpochs',4, ...
'ValidationData',imdsValidation, ...
'ValidationFrequency',30, ...
'Verbose',false, ...
'Plots','training-progress');

net = trainNetwork(imdsTrain,layers,options);

1-27
1 Getting Started

For more information about training options, see “Set Up Parameters and Train Convolutional Neural
Network”.

Test Network

Classify the validation data and calculate the classification accuracy.

YPred = classify(net,imdsValidation);
YValidation = imdsValidation.Labels;
accuracy = mean(YPred == YValidation)

accuracy = 0.9892

For next steps in deep learning, you can try using pretrained network for other tasks. Solve new
classification problems on your image data with transfer learning or feature extraction. For examples,
see “Start Deep Learning Faster Using Transfer Learning” and “Train Classifiers Using Features
Extracted from Pretrained Networks”. To learn more about pretrained networks, see “Pretrained
Deep Neural Networks”.

See Also
trainNetwork | trainingOptions

More About
• “Start Deep Learning Faster Using Transfer Learning”
• “Create Simple Image Classification Network Using Deep Network Designer” on page 1-29
• “Try Deep Learning in 10 Lines of MATLAB Code” on page 1-13
• “Classify Image Using Pretrained Network” on page 1-15
• “Get Started with Transfer Learning” on page 1-17
• “Transfer Learning with Deep Network Designer”
• “Create Simple Sequence Classification Network Using Deep Network Designer” on page 1-34

1-28
Create Simple Image Classification Network Using Deep Network Designer

Create Simple Image Classification Network Using Deep


Network Designer
This example shows how to create and train a simple convolutional neural network for deep learning
classification using Deep Network Designer. Convolutional neural networks are essential tools for
deep learning and are especially suited for image recognition.

In this example, you:

• Import image data.


• Define the network architecture.
• Specify training options.
• Train the network.

Load Data

Load the digit sample data as an image datastore. The imageDatastore function automatically
labels the images based on folder names. The data set has 10 classes and each image in the data set
is 28-by-28-by-1 pixels.

digitDatasetPath = fullfile(matlabroot,'toolbox','nnet','nndemos', ...


'nndatasets','DigitDataset');

imds = imageDatastore(digitDatasetPath, ...


'IncludeSubfolders',true, ...
'LabelSource','foldernames');

Open Deep Network Designer. Create a network, import and visualize data, and train the network
using Deep Network Designer.

deepNetworkDesigner

To create a blank network, pause on Blank Network and click New.

To import the image datastore, select the Data tab and click Import Data > Import Image Data.
Select imds as the data source. Set aside 30% of the training data to use as validation data.
Randomly allocate observations to the training and validation sets by selecting Randomize.

1-29
1 Getting Started

Import the data by clicking Import.

Define Network Architecture

In the Designer pane, define the convolutional neural network architecture. Drag layers from the
Layer Library and connect them. To quickly search for layers, use the Filter layers search box in
the Layer Library pane. To edit the properties of a layer, click the layer and edit the values in the
Properties pane.

Connect layers in this order:

1 imageInputLayer with the InputSize property set to 28,28,1


2 convolution2dLayer
3 batchNormalizationLayer
4 reluLayer
5 fullyConnectedLayer with the OutputSize property set to 10
6 softmaxLayer
7 classificationLayer

1-30
Create Simple Image Classification Network Using Deep Network Designer

For more information about deep learning layers, see “List of Deep Learning Layers”.

Train Network

Specify the training options and train the network.

On the Training tab, click Training Options. For this example, set the maximum number of epochs
to 5 and keep the other default settings. Set the training options by clicking Close. For more
information about training options, see “Set Up Parameters and Train Convolutional Neural
Network”.

1-31
1 Getting Started

Train the network by clicking Train.

The accuracy is the fraction of labels that the network predicts correctly. In this case, more than 97%
of the predicted labels match the true labels of the validation set.

To export the trained network to the workspace, on the Training tab, click Export.

1-32
Discovering Diverse Content Through
Random Scribd Documents
The Project Gutenberg eBook of Future
Development of Japanese Dwelling Houses
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: Future Development of Japanese Dwelling Houses

Author: Shigetsura Shiga

Release date: January 18, 2016 [eBook #50963]


Most recently updated: October 22, 2024

Language: English

Credits: Produced by Fay Dunn and the Online Distributed


Proofreading
Team at http://www.pgdp.net (This file was produced from
images generously made available by The Internet Archive)

*** START OF THE PROJECT GUTENBERG EBOOK FUTURE


DEVELOPMENT OF JAPANESE DWELLING HOUSES ***
Transcriber’s Note
This thesis has been transcribed from a hand written document, some Japanese and
Latin words were differentiated by printing them, these are shown in italics.
Plates have been moved to the start of the paragraph which they illustrate. Titles,
notes and labels from the plates have been transcribed at very end of the book
Footnotes have been moved to the end of the paragraph to which they refer.
Inconsistent hyphenation, variant spelling and the author’s romanization of Japanese
words have been retained. No changes have been made to correct grammar, but minor
changes have been made to punctuation. Other changes that have been made are listed
at the end of the book.
FUTURE DEVELOPMENT OF JAPANESE
DWELLING HOUSES
BY

SHIGETSURA SHIGA, B.S., 1893

THESIS

FOR THE DEGREE OF MASTER OF ARCHITECTURE

IN THE

GRADUATE SCHOOL
UNIVERSITY OF ILLINOIS

PRESENTED, JUNE 1905


UNIVERSITY OF ILLINOIS
June 1 1905

THIS IS TO CERTIFY THAT THE THESIS PREPARED UNDER MY

SUPERVISION BY

Shigetsura Shiga, B.S. 1893.

ENTITLED Future Development of Japanese Dwelling Houses

IS APPROVED BY ME AS FULFILLING THIS PART OF THE

REQUIREMENTS FOR THE DEGREE

OF Master of Architecture

N. Clifford Ricker

HEAD OF DEPARTMENT OF Architecture


Future Development of Japanese Dwelling
Houses.
Shigetsura Shiga, B.S.

Introduction.
It was comparatively recently that it became in vogue for the
educated circle in Japan to tour over Europe and America to observe
and investigate the manner and customs of those civilized nations.
And at length they deduced a conclusion that the so-called civilization
of the West is not only based on superficial progress of materialism
but it had profound root in the mental training of the citizens;
comparison and discussion have taken place in every institution of
education throughout the Empire. This is one of the procedures of
pushing one step further toward the advancement of this country. We
hear also too often of late years as to the questionable qualities of the
behavior of citizens toward the public, and so much talk about the
improvement of general customs of the country. All these are only
reflections arising from sharp observation of intelligent Japanese Globe
trotters who carefully compared with keen eyes all the conduct and
behavior of natives.
The manners and customs of a nation are only the reflection of
means of existence, which mainly consist of clothing, food, and
shelter; what we call improvements of national living is in the main
improvements in these three things. Other thing, such as etiquette,
form only an insignificant part which necessarily comes from the
method of living; when the latter undergoes a change a corresponding
change will follow in the former.
Here the question comes on the start and which at least is a most
predominant factor governing the design of our dwelling houses. Have
we to design our houses so as to sit on the mat, or to sit on the chair?
This may sound strange to a person alien from Japan, yet it is a most
important question for the native Japanese in this time of transition. It
will be too severe to urge one to chose one in preference to another.
If he likes to sit on the mat as he has done, or sit on the chair as all
European nations do, either make no difference according to my own
view, and under the circumstances of our modern mode of living the
houses should be suitable for either way; the future will decide this
question. Remember, however, that the way of bending the legs under
the weight of the body to which we have so long been accustomed
and which has characterized Japanese from all other nations is surely
a great impediment for the development of our legs; comparative
shortness of legs of all Japanese has as believed by some its cause in
this habit. Stretching a body on the Futon (a bed, without bedstead,
simply spread over the mat[A] on the floor) at night is not healthy
mode of sleeping from hygienical stand point taking in the air much
loaded with carbonic acid gas at night. Only common sense is enough
to know whether it is evil or not. Still I do not insist upon changing our
mode of daily life instilled in us from time unknown; it might be too
severe to persuade one to accomplish the work which is almost
impossible to do at present; it would be better to leave this question
to one’s own judgement for awhile. It will not take more than a
century before the problem is solved; and meanwhile it is enough to
remember that the only way for progress is to abandon what one
consider wrong and to adopt what is right. An inclination of a few
minutes of a navigator’s compass when he leaves a port makes a
divergence of thousands of miles in a course of a few days, so the
discrimination of the majority of people however small the matter may
be, greatly influences the civilization of a country.

[A] Japanese mat is 2 ft. 10¾ ins. by 5 ft. 9½ ins. having thickness
of 2½ ins. laid on wooden floor.

The second question is whether our dwelling houses should take an


appearance of European style or Japanese in aspect. According to my
own view, if one choose his habitation to look European he need not
hesitate to do so; but if he prefer to treat his house with Japanese
design he may do it so: Chinese, Hindoo, Greek, or Roman make no
difference whatever as far as the selection of design is concerned; the
determination of national art is another question not involved here.
The freedom of design should strictly be observed in any time and
place provided the precautions hereafter set forth be carefully heeded.
To live in a perfect house is an ideal or ambition quite out of reach;
but if he is wealthy enough to start a new home, that impartial
judgement and trained eyes with which he should discriminate what
the result will be is always necessary. It is dangerous for an uninitiated
to live in a house designed by an uninformed builder or an ignorant
amateur architect; the outlay for the house is too high to merely
display one’s vulgarity or low taste. A result which is an outgrowth of
inexperienced hands with little or no attention to the modern
application of science, and a sequence of a gathered knowledge of
worthless, scattered information would undoubtedly be surpassed by
that which worked upon common sense as its foundation and was
finished by the principle of aesthetics. This is a paramount important
point to be considered by either an architect or a house owner, and is
the only way to attain a result near to the perfect and not far from
ideal. In this time of transition the design of the Japanese dwelling
houses has no definite course by which to follow. And I deem it
necessary to point out what to be done and what not to be done for
architects and clients, for it concerns greatly the future development
of Japanese dwelling houses.
The object of human habitation is not only to keep out the weather
or to sustain the life alone; the habitation of primitive aborigines were
just for that purpose and had no further need arising from the want of
daily necessity. The development of human intellect improves the
method of living and its reflection is made apparent by the mode of
cloth, food, and dwelling. Civilized nations are not satisfied with
houses which were built only to keep out weather or to sustain the life
alone, but seek the dwellings which keep their life most safely and at
the same time most comfortably. The modern requirements of houses
are much complicated and involve so many principles. Notwithstanding
that the subject is one of the most interesting as well as
comprehensive among architects, yet it is viewed by Japanese
architects with somewhat of indifference. The aim and object of
dwelling houses is of course safety and comfort in living, but in order
to meet the requirements of the house we have to further consider it
from scientific, economical, and artistic stand points. It would
therefore be appropriate to establish a maxim according to reasoning,
as is generally done, either in criticizing or creating any thing; and my
discussion on Japanese houses is no exception.
Principles involved in house designing are not so simple as one
would suppose, for the work of house designing is simply an
application of the scientific, economical, and artistic idea. In other
words, stability, sanitary, convenience, economy, comfort, and beauty
are six principal elements which no architect or house owner should
lose sight of. These elements are principles which govern the
designing of houses and conditions which are to be fulfilled, if a house
is desired to be perfect, in any time and place. All houses should be
erected on these foundations. But the further we think the more we
feel the question becomes complicated; for the question of the houses
is not so simple that we can grasp it under the elements cited above.
A house as the abode of man as a social being; has it no relation to
the development of human society and human culture? Also has it no
concern with human character and conduct? In discussing dwelling
houses, all these should be taken into consideration. And though it
seems to be entirely beyond the scope of an architect’s work, yet it
has a great concern with the future development of Japanese houses.
There can be nothing perfect in this world; in order to fulfil one
desire something else may or must be sacrificed: for economy’s sake
beauty may be sacrificed; for sanitation convenience will perhaps, be
a victim. On the whole, the work of a house architect is plainly a
matter of compromise.
Modern Japanese dwelling houses should not be regarded like
curios which only gratify the owner’s curiosity by decorating Tokonoma
(the recess in which Kakemono is hung) and Chigai-tana (a shelf in
the recess next to Tokonoma, art objects being generally displayed on
it) in a parlor. A house erected in its rational and appropriated form,
on lot in the circle of the metropolitan city of the empire, attracts
attention of all nations at large; no matter whether it is a private or a
public building is entirely of a public nature. The house is undoubtedly
the property of the owner, yet in its widest sense the property of a
country, and has a great influence upon public happiness, and at once
reveals the standard of living of the natives. We see many a beautiful
residence in Europe and America and notice that they are not only
boasted of by the owners themselves but by the citizen who guides us
to the quarter where wealthy people dwell. They are apparently proud
of the beautiful houses, but it may be understood that they are
inconceivably proud of the country which possesses them in its realm.
A house is surely a decoration of a state, an embellishment of a city,
an achievement of the fine arts. Natural supremacy of scenic beauty is
no special credit to the country. Artificial supremacy in art and science
is true pride of a nation.

Plate 1.
Plate 2.

Plate 3.
Plate 4.

Plate 5.
Plate 6.

Japanese houses in general are destitute of nature of publicity; they


are confined in the enclosure of earth wall or tall wooden fence so
that they are hardly seen from outside (see the drawings of different
style of fences). Does this not mean that the house is build for one’s
own sake not being for the purpose of showing it to others? This
spiritual selfishness is well manifested in the predominant feature of
Japanese dwelling houses. Or we may draw a conclusion in another
way. The Japanese are generally known as reserved or modest people
and do not like to show off what they possess or what they have
done; they feel quite a shame if they are regarded by others to be
pretentious or vain. This prevalent motives common to all Japanese,
pervades all the doings of the people. The seclusion of Japanese
houses from the sight of the public is mainly ascribed to this fact; the
true phase perhaps not being in the selfishness but in the reserve. It
may be admitted, however, that Japanese houses in their construction
are not suitable to show whole structure to the public thoroughfare.
There is another reason that compelled the Japanese houses to take
the feature of seclusion; in the feudal time of Tokugawa Shōgun, more
than three hundred lords or Daimio being scattered over the whole
empire ruled their subjects or retainers with what we now might call
despotism. A subject who is in a habit somewhat of showing off his
wealth could not escape from the eyes of a lord, or a lord of lords the
Shōgun. The heavy tax was levied from him not as a charge for vanity
but it considered his wealth to be capable of giving as much
substantial assistance as he could endure for his lord.—The Corean
people of today is unfortunately a victim of authority under the same
circumstance.—Under such circumstances, is it not natural that a
person conceal his wealth from the inquisitive eyes of authority? The
seclusion of houses became necessary and it was, in fact, a natural
consequence. Japanese are modest or reserved as most Europeans
call them, but notice there is a difference between reserve and
concealment. Are Japanese houses modest or reserved as a result of
national spirit? Or are they so in order to conceal their true phase?
This is a question not easily determined, still it is safe to regard the
result as a sequence of mental reserve and material concealment,
altogether inadmissible to the modern idea.
If one is loyal enough to his country give up the principle of
seclusion.—I do not for a moment mean to persuade to show off—
widely open the gate and manifest the true phase of the house and
beautify it with his might, and, as a group, decorate the city; it is a
duty as a citizen, and is charity to the poor as a certain English lady
puts it. Tall wooden fence, heavy earth wall inclosing both houses and
gardens, altogether impressing an idea of a prison, should be avoided
in the houses to be erected hereafter.
This wide open idea much deviates from the statement made by the
author of “Successful Houses” on the American dwelling houses; “it
certainly lends no picturesque element to the landscape, and affords
not the slightest trace of privacy to its owner, but simply boldly
proclaims the ownership of the enclosed earth, as if to say: ‘I own
these 60 × 175 feet; you may look over and covet my house, but you
may not enter’.” I do not believe that American wide open principle of
house lot may involve any selfishness or means to excite covetousness
of passing strangers. This principle, however, may not prove to be
harmful if it introduced, to a certain extent, in a seclusion principle of
our Japanese houses. Here I should again state that the seclusion
principle of Japanese houses does not involve any sense that “each
man’s house is his castle” which was said by laying most stress upon
man’s proper right. On the whole, the comprehensive idea of reserve
and modesty pervades all Japanese houses from exterior treatment
and to interior decoration. If it is one of the principles of human
nature that things half seen appeal most strongly to our taste and
tempt us most with interest and appreciation, as the same author
said, American fences are too low, and those of Japanese are too
high; we should take the average of the two.
The question of home education is a much talked of subject of late
years. It is of paramount importance for the parents and elders of a
family to lead their youngers and children by behaving themselves so
that the latter can be moulded after the mould which had been laid
down by the former. Most Japanese emphatically call attention to this
point when they talk of the home education. But we should
acknowledge that this is not all that will affect the character or culture
of young people. Every body knows that a school, in its nature is a
place where the young people are educated; yet the majority of
people do not know how the preliminary considerations had been
taken in to account before the erection of the school was carried out;
the kind and arrangement of the seats and desks, the position of black
boards, the size of windows, the descriptions of curtains, the size and
shape of class rooms, the height of ceiling, and even the minor detail
of open and close arrangement of doors. These and many other
particulars are subjects which one cannot lose sight of before the final
end of education is fulfilled. Thus, if such preliminaries be necessary in
schools, why are not like cautions, if not the same, necessary for our
dwelling houses in order that they may serve the purpose of home
education?
It may have a certain effect upon undeveloped minds of children to
impart the mental taste of fine arts if one decorates the rooms with
pictures and curios. The hanging of atlas and the exhibits of the
specimens of plants and animals in rooms for decoration may help the
development of their scientific idea. Any picture or bust of an
illustrious man may give a hint in regard to their future career. These
are not important factors, however, from an architectural stand point,
as the decoration of a house though they may have no small influence
upon childrens’ character.
A father is the man who knows best his son’s character. Japanese is
the man who is most fully aware of the weak points of his fellow-
citizen; every body admits that we are inclined to irregularity in doing
things, destitute of selfrespect, indifferent regarding individual proper
rights, these are only a few among many which are to be cited. I feel
myself that these weak points as a nation may be attributed, for the
most part, to the construction and arrangement of the houses we live
in. We know that our present houses are the consequence of a change
of our national character which has been taking place from time to
time, and I deem it quite high time for us to form a new character by
picking up every thing that is good and throwing away every thing
that is evil without any regard to prejudice and to give birth to a new
form in this land of whirlpool of occidental and oriental current. Let me
give examples how our houses exerted an influence upon our
character, and thus the conclusion may be drawn that in order to bring
about a new character we have to remodel our houses accordingly.
Notice the manner of the working class when they are doing work;
they take rest irregularly while working; tea, tobacco, newspapers are
things to interrupt the continuity of working hours, and even a little
time is stolen by talking over some matter which appeared in the
newspaper. This is not only the case with working class, but in some
extent may be applied to the officials of some public and private
establishments. There may be various causes of this manner of
irregularity of working, still I dare to say that the construction of our
houses is one of the influences which tends to this abominable habit.
At least we are trained to do so in our houses. If we do so in the
house, why not so outside of the house? Nearly all wall surfaces of
Japanese houses are open for Shōji (sliding sashes lined with white
paper having grooves on a sill, sashes sliding on these grooves) or
Fusuma, so that the temperature of inside and outside is nearly the
same in winter. The perfect ventilation is secured only at the expence
of heating. And if this imperfectness of heating be ascribed to the
situation of the country which, in most part, lies in the temperate
zone, we find quite a contradiction to this in the fact that Japan
contains states in the south whose average temperature is just as
warm as the Sandwich Island and in the north the states whose
temperature is just as cold as Boston, and yet the feature of houses is
about the same in both extremities except a little modification in
construction. We find such a fact in all countries in the world.
Architecture is more affected by the influence of style and materials
than climate itself.
Japanese houses are heated by “hibachi” (literally means a fire box:
a box generally made of wood, the inside of which is lined with a
sheet of metal and in it fine ashes are filled and in the middle of it
charcoal fire is placed. It is an exquisite piece of cabinet work. The
average size is One foot six inches square and about one foot high
though there are great many different sizes and designs) in winter. It
is not indeed sufficient to meet the requirement for heating, and is not
admissible from the sanitary point of view. As we have nothing for
heating purpose but this “hibachi”, the only way to get warm is to
expose our face and hands over the fire so that our working hands are
practically tied up, for “hibachi” is not intended to warm the room,
inasmuch as the box is not designed to do so. Tea, teapot, teacups,
and hot water are generally seen around “hibachi” and attract one’s
temptation. This is a part of home life and often seen even in old
business offices and work shops. In winter we have such a system of
heating far more primitive than fireplace which was much admired by
J.P. Putnum. How can we hope from such institution a satisfactory
result of working? This custom leads us to do work irregularly indoors
as well as outdoors. In a word the construction of our houses is
responsible for a large share with this evil result.
Plate 7. “SHŌJI”

Plate 8. “FUSUMA”

The rareness of partition walls is a main feature in our houses.


“Shōji” and “Fusuma” are only partitions which divide one room from
another. (“Shōji” and “Fusuma” are illustrated in the plates) A house
itself is one vast room if “Shōji” and “Fusuma” be removed, and from
a master’s room a kitchen and servants’ room are visible, for there is
no distinct partition between them. Because “Shōji” and “Fusuma” are
not sufficient partition to separate one room from another, simply we
are careful not to intrude one another’s rooms. In respectable families
etiquette is strictly observed, and by this imaginary partition alone one
room is divided from another. As we cannot expect such an imaginary
partition in ordinary families, an inevitable rude practice of intruding
on other’s room is unavoidable. Although in our houses a long narrow
veranda serves the requirements of a hall or a passage in European
houses, still the lack of hall system might be a main cause of the
careless practices referred to. Even though one dares not pass
through the “Fusuma”, for instance in a hotel, the voices can be heard
and dust can penetrate through the open joint of “Fusuma” into the
next room. This makes evident that the fact that our houses are so
arranged that the privacy of rooms is totally neglected. On the whole,
abolish “hibachi” so as to avoid an irregularity of working; put up
partition in order to secure privacy. Then one of the material aids of
promoting the spirit of selfrespect may be established.
It is generally conceived that Japanese do not lay much stress on
individual rights. This is well understood from the utter lack of privacy
of rooms. We can notice it specially in hotels under pure native plan.
Privacy of a room as I said is not well observed by the average
Japanese, notwithstanding much attention has been paid to that in
the form of etiquette by the higher class of people, though the
planning and construction of Japanese houses make it inconvenient to
enforce it. “Privacy”, said the authors of “The Decoration of Houses”,
“would seem to be one of the first requisites of civilized life, yet it is
only necessary to observe the planning and arrangement of the
average house to see how little this need is recognized. Each room in
a house has its individual uses: some are made to sleep in, others are
for dressing, eating, study, or conversation; but whatever the uses of
a room, they are seriously interfered with if it be not preserved as a
small world by itself”. The authors do not recognize that privacy has
been well observed even in European houses. How far this was
observed in our houses needs to be considered.

Plate 9. PLAN OF A JAPANESE HOUSE


Plate 10. PLAN FOR A DWELLING HOUSE

In a word we should build houses for the appearance sake so far as


architectural aspect is concerned, and as to the interior the privacy
should never be lost sight of. Our houses run from one extreme to the
other; unless they are kept strictly secluded by walling the house lot
by tall fences they are so widely open that one can see at a glance
from one corner of a house. We frequently notice it among the lower
classes of people. Fences are walls in Japanese houses; if they be
taken away a house stands naked or defenceless. How the nakedness
of a house exerts an influence upon the moral effect of inhabitants of
the house, we can tell it at once by their indifference to the individual
right, and their rude demeanor to the general public.
Vicissitude of the mode of living represents the alteration of the
custom of a country, and the latter is the result of the change of a
mental taste of the people forming a majority of a nation. In this time
of transition a considerable change in mental taste has occurred and
many a rite of old has been rooted out since the revolution of 1867.
The houses in feudal times were chiefly planned to comply with the
mode of living of aristocracy or fashioned after the spirit of Samurai
class. (The martial class). The “Shinden-tsukuri” (living-palace-type) or
“Adzumaya” of more than one thousand years ago was a nature of
pure aristocracy; indulgence in gratification of a pleasure being the
predominant object of its plan. The whole group of buildings was like
a summer house in modern sense. On the other hand, “Shoin-tsukuri”
(Study room-type) was a type which well represents the spirit of
Samurai, and it became undoubtedly the prototype of modern
Japanese dwelling houses.
To turn our attention for a while to an immaterial side of Japanese
domestic architecture noticing how it had been subjected under the
spiritual influence which at least in Japanese houses is efficaciously
influenced by other elements like religion, climate, and foreign
country, I deem it not quite amiss in this theme.
Plate 11. A LARGE GATE AND ‘MUKURI-HAFU’ ROOF

Samurai class, the heart of the citizen represented the nature and
characteristic of all Japanese. Beside this there were agriculturists,
mechanics, and merchants forming four classes of Japanese society.
May it be understood that the social classes of Japan was not so
severely divided as Hindoo castes intermarriage between classes being
comparatively free, and occupations not necessarily descended rigidly
from father to son. Although these classes had been withdrawn from
society since the political revolution of 1867, still the spirit remains. It
may be interesting to note how this spirit is expressed in our domestic
architecture; Samurai likes to dignify himself and rule his retainers
accordingly; so the house has a ridiculously large gate and occupies
exceedingly vast area in its plan. Samurai observes the propriety of
etiquette in the highest degree as he thinks it a most important factor
of a social decorum; for that reason, even though there is no proper
partition in the house etiquette works like a strong wall. Samurai will
be regarded as mean if he displays his possession like an exhibition,
he intends it to be recognized that his mind is as clean and simple as
clean water is in spite of having much valuable contents within; so in
his parlor nothing is to be seen as decoration but “kakemono” (paper
or silk hanging scrolls on which there may be paintings by eminent
artists or ideograms of famous personages) flower vase, if any, in
“Tokonoma”, and a few valuable articles on “Chigai-tana”, and perhaps
one or two “gaku” (painting or ideogram in a frame) over a lintel of
“Shōji” or “Fusuma”. These are all that we can find in the parlor while
hundreds or thousands, if he is wealthy enough, of these descriptions
are stored in “Kura”. (a detached store room of half fire-resisting
construction) Samurai thinks it a greatest honor to keep his family
name among the martialhood as long as he can. He feels the greatest
disdain or shame if his family name is discarded from a list of
martialhood by any silly conduct, which can be redeemed only by
death. This naturally inspires him with reverence of forefathers who
had handed down the stainless family to his reign. Hence we see in
many plans of houses of respectable Samurai a room preserved for
images of forefathers. This is not only found in the house of class but
in all classes of citizens and this for the most part may be ascribed to
the effect of Buddhism and Shintoism, the national religions of Japan.
Samurai, however is rather indifferent in regard to religious matters in
comparison with other classes of society; though the spirit of honor or
something like chivalric idea of middle ages in Europe was heightened
to the utmost. As to the idea or conception of Samurai Professor Inazo
Nitobē in his recent work “Bushido, the soul of Japan” treats it in full
detail, my conception on the same may not precisely conform with
Professor Nitobē, still I believe there may not be a great contradiction
between us. On the whole in the feudal system of a government the
relation of a Daimio or a leader of Samurai to the latter is well
manifested in a like feature in the relation between Samurai and his
retainers. The shadow of feudal systems is cast in everywhere in
social life and even the planning and construction of a house is greatly
modified by it.
It is curious to note that so called American balloon frame
construction represents the idea of Americanism, the democracy, each
member having no special office particularly assigned to it, yet stands
firmly by joint strain. I do not for a moment deduce that a system or a
form of government has any direct connection to the construction of a
house; but it modifies greatly in the planning of a house for the
reason that a plan of a house evolves a national idea. This is well
illustrated by the plan of both American and Japanese dwelling
houses. Is it not also strange to observe that by studying the
construction of our peasant’s house which has a middle, main post
called a “Daikoku-bashira” (“Daikoku” is a name of god of wealth,
“hashira” or “bashira” for euphony means a post or column) to which
all structural stability is concentrated? A construction well suited to the
aristocratic form of state only having no king post or queen post; but
have “Daikoku-bashira”! When aristocracy in connection with feudal
system was the form of government the family life of Daimio was
simply a smaller type of it and Samurai and other wealthy families
were still smaller of types of government; thus the house plan was
made to conform with their traits. The fact that the form of
government of a state modifies the architecture of the dwelling house
is also exemplified by the house of England and France of the
sixteenth century. Indeed, most of our houses of today were chiefly
modeled after the prototype of former Samurai houses. Now the
spirits of commonwealth and liberty pervade all through the country;
daishō (long and short swords borne by Samurai) were thrown away,
mage (hair tied up at the top of a head. The old custom of Japan) was
cut off, even the clothing was partly changed and yet we are faithfully
following a mode of living which is half obsolete. Japan is in the state
of transition from old to new from destruction to upheaval in
architecture and in every thing. Cannot we hope to create a new
design unless the old had been destroyed?
The houses as any other objects of utility should be improved by
keeping abreast with the advancement of science. The house as a
thing which has a money value and useful object to contain human
beings, is not different from the railroad train and the steam boat.
While a marked progress in these is being noticed from time to time
what have we done for the house? We have shown a certain
improvement in aspect by adopting European architectural style in
house design, but a very little alteration has been done in its plan.
What improvement have we accomplished toward its construction,
materials, decoration, and workmanship? Besides the use of glass in
“shōji”, iron and zinc plates in roof and gutter, what else have we used
but ordinary building materials which have been handed down from
time immemorial? What is the difference between our houses and
those of our ancestors in aspect, construction, materials, and
workmanship?
The history of Japanese dwelling houses is a subject not well
studied by any architect or man of literature. Though much light has
been thrown on the history of Japanese religious architecture by
Professor Itō of the Imperial university of Tokyo, we can infer very
little from him as to how our dwelling houses were in the past.
Religious buildings and palaces form an important element in the
history of architecture in all nations, and Japan is no exception. But it
is not the aim of this theme to give a historical sketch of Japanese
architecture from its earliest time, the object being only to show here
the stage of development of our houses and thus I mean to infer that
an important change should take place in the future.
The history of Japan dates as far back as six hundred sixty years
before the Christian era. Before this date we call it the legendary era.
According to the decree of administrative court of Shinki it says “in our
legendary era the people were primitive, living in caves in winter and
nestling on trees in summer”, we can imagine from this that in earliest
time we were cave dwellers in winter and tree nestlers in summer like
natives of New Guinea of the present time. In time of Jimmu the
founder of the Japanese Empire (660 B.C.) the houses developed in
wooden type and henceforth wood became the only building material.
Early Japanese houses had no decoration whatever and it seems to
me that since 190 A.D. when Coreans brought some coloring pigments
as tribute to the government of Jingo-Kōgō the painting was applied
for the first time to the building, but it is certain that the color was
applied only to the palace not to the “Yashiro” (Shintō temple) nor to
the dwelling houses. The dwelling houses. The dwelling houses were
much improved in the time of Shōmu, (767 A.D.) the zenith of
religious architecture. It was then that tiles were used for the first
time as the roof covering in common dwelling houses which before
that time were mostly covered by the bark of hinoki. (Thuya Obtusa,
Benth) In common houses tiles were not yet used so abundantly as in
temple roofs; they were used on the ridge only; the rest being
covered by barks of wood. The plastered wall was also introduced at
this time. It may, however, be remembered that that plaster consisted
of lime and sand. Perhaps having some mud in the mixture; no
gypsum was in use as in European plaster.
The ages between eighth and twelfth centuries, which includes a
little more than three hundred and eighty years, when the Fujiwara
family played an important role in the government formed a most
prominent epoch of art and literature in the history of Japan. The
long, peaceful reign generally ensues an effeminate tendency to the
spirit of a nation especially to the nobility who had every facility to
possess every thing at call. The result is the production of “Azumaya”
or “Shinden-tsukuri”. The plan of which is by no means a desirable
type of residence even for a nobility of today. But, to be sure, it served
the requirement of the day in which the higher class of people
indulged mostly in music and poetry, festival and pleasure. The plan of
the Shinden type reminds me of the notable building the “Hō-oh-dō”
which was built at this time that is some eight hundred years ago in
Yamashiro and which still remains in this day in the same spot after
long defacing action of nature. It had the honor of being reproduced
in Jackson Park at Chicago in 1893 as a representation of Japanese
architecture.
Plate 12. SHINDEN-TSUKURI

The plan of “Shinden-tukuri” consists of a main or middle building


flanked with two wings or detached rooms on the east and west
connected by porches. The size of the main building was generally 70
feet square, sometimes as large as 120 feet square and even as small
as 50 feet square according to circumstances. The interior of the
building consists of a main middle room surrounded by a wide corridor
laid with mats, reception room, store room etc. being arranged in this
corridor each room divided by curtains. The east and west wings were
used as living rooms, and perhaps the kitchen was in a detached
house. It is imagined from the arrangement of rooms that the house
was not planned merely for the purpose of pleasure. The ninth
century of Christian era which corresponds to Tun dynasty of China
was a great era for introducing art and literature from China through
the hands of Buddhist preachers who had been sent by the
government to observe the civilization of China; Kōbō-daishi and
Saicho were most influential persons among scholars and religionists
of the time. They returned home from their mission abroad well laden
with the knowledge of art and literature which had been scattered all
through the empire. The palace was planned on the largest scale ever
carried on after the plan of a Chinese palace. The “Shinden-tsukuri” is
undoubtedly a modification of the latter.
“Shōji” and “Fusuma” were not used in “Shinden-tsukuri”, and in
outside openings what is called “Kōshi” (the framed lattice window
hung vertically in a manner something like a vertical trap-door with
thick white paper stretched on one side) was used. It is divided into
two sashes the upper part of which is pushed outward, by means of
stays, for ventilation. The hanging arrangement, it seems to me, was
general in these times, for the means of partition was achieved by
hanging tapestry, reed mats etc. which were hung on lintels of
openings. Insufficient function of partitions, the negligence of privacy
of rooms were already manifested in these times in our houses; no
wonder that our houses of today are built with no regard to this point.
The “Tatami” (floor mats, literally meaning to fold) had not taken the
form of modern “Tatami”, it was so shaped that when not in use it was
put away folding in suitable size, and made of leather, reeds, silk cloth
etc.
From the early part of the fifteenth century, the latter part of middle
ages in Europe, the whole empire had fallen into a scene of chaos;
innumerable old edifices, public documents, private writings, in a
word, the whole art and literature were destroyed under the merciless
fire of war. Amid this confusion, we can trace the gradual outgrowth of
another type of art; the Shinden type gave place to Shoin type or
“Shoin-tsukuri”. Shoin in modern idea means a room for study; but on
certain occasions it was used as a reception room. The Shoin type
proves that the mere copying of Chinese palace like “Shinden” no
longer satisfactorily fulfilled the requirement of the day. The “Shoin-
tsukuri” is indeed a prototype of our modern house. Our “Zashiki”
(parlor) was surely modeled after it, for it has “Tokonoma”, “Tsuke-
shoin” (a recess for books) and “Tana”, (“Chigai-tana” in the modern
house) all of which are main feature of our parlor. Shinden being
surrounded by corridor, a vast main middle room is shut out from
light, on the contrary the Shoin has light in abundance. It may not be
amiss to add a few lines here in regard to “Tokonoma”. What the
“Tokonoma” is in Japanese parlor the fireplace is in American parlor.
The use of “Chigai-tana” in the former house is like an alcove and
shelf put together in the latter house. The fireplace or mantel-piece in
American house affords dignity and cheerfulness to the room besides
the proper use beautifying and warming the room. “Tokonoma” and
“Chigai-tana” in our houses may give thoroughness of the room by
breaking up the feeling of vastness and bareness of the whole
appearance, and the nature of decorative treatment may impart the
sense of reverence and dignity but no feeling of cheerfulness is
imparted. It is altogether too formal, too traditional, and too
conservative, and is more formal than is the American fireplace.

Plate 13.

You might also like