100% found this document useful (29 votes)
68 views

[FREE PDF SAMPLE] Deep Learning with Applications Using Python Chatbots and Face, Object, and Speech Recognition With TensorFlow and Keras 1st Edition by Navin Kumar Manaswi ISBN 1484235169 9781484235164 ebook full chapters

The document provides a collection of ebooks focused on deep learning and machine learning, including titles such as 'Deep Learning with Applications Using Python' and 'Hands-On Machine Learning with Scikit Learn and TensorFlow.' Each entry includes details like the author, ISBN, and links for instant download. The ebooks cover various topics, including TensorFlow, Keras, natural language processing, and generative adversarial networks.

Uploaded by

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

[FREE PDF SAMPLE] Deep Learning with Applications Using Python Chatbots and Face, Object, and Speech Recognition With TensorFlow and Keras 1st Edition by Navin Kumar Manaswi ISBN 1484235169 9781484235164 ebook full chapters

The document provides a collection of ebooks focused on deep learning and machine learning, including titles such as 'Deep Learning with Applications Using Python' and 'Hands-On Machine Learning with Scikit Learn and TensorFlow.' Each entry includes details like the author, ISBN, and links for instant download. The ebooks cover various topics, including TensorFlow, Keras, natural language processing, and generative adversarial networks.

Uploaded by

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

Explore the full ebook collection and download it now at ebookball.

com

Deep Learning with Applications Using Python


Chatbots and Face, Object, and Speech Recognition
With TensorFlow and Keras 1st Edition by Navin
Kumar Manaswi ISBN 1484235169 9781484235164
https://ebookball.com/product/deep-learning-with-
applications-using-python-chatbots-and-face-object-and-
speech-recognition-with-tensorflow-and-keras-1st-edition-by-
navin-kumar-manaswi-isbn-1484235169-9781484235164-16118/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://ebookball.com


Click here to visit ebookball.com and download ebookball now
Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Deep Learning With Python 2nd Edition by Francois Chollet


1617296864 9781617296864

https://ebookball.com/product/deep-learning-with-python-2nd-edition-
by-francois-chollet-1617296864-9781617296864-17216/

ebookball.com

Natural Language Processing With PyTorch Build Intelligent


Language Applications Using Deep Learning 1st edition by
Delip Rao, Brian McMahan 9781491978184 149197818X
https://ebookball.com/product/natural-language-processing-with-
pytorch-build-intelligent-language-applications-using-deep-
learning-1st-edition-by-delip-rao-brian-
mcmahan-9781491978184-149197818x-18728/
ebookball.com

(Ebook PDF) Generative Adversarial Networks With Python


Deep Learning Generative Models for Image Synthesis and
Image Translation 1st edition by Jason Brownlee B0DM2GW1MW
full chapters
https://ebookball.com/product/ebook-pdf-generative-adversarial-
networks-with-python-deep-learning-generative-models-for-image-
synthesis-and-image-translation-1st-edition-by-jason-
brownlee-b0dm2gw1mw-full-chapters-10052/
ebookball.com

Hands On Machine Learning With Scikit Learn and TensorFlow


Techniques and Tools to Build Learning Machines 3rd
Edition by OReilly Media ISBN 9781098122461 1098122461
https://ebookball.com/product/hands-on-machine-learning-with-scikit-
learn-and-tensorflow-techniques-and-tools-to-build-learning-
machines-3rd-edition-by-oreilly-media-
isbn-9781098122461-1098122461-15618/
ebookball.com
Mastering Machine Learning with Python in Six Steps A
Practical Implementation Guide to Predictive Data
Analytics Using Python 1st Edition by Manohar Swamynathan
ISBN 1484228669 9781484228661
https://ebookball.com/product/mastering-machine-learning-with-python-
in-six-steps-a-practical-implementation-guide-to-predictive-data-
analytics-using-python-1st-edition-by-manohar-swamynathan-
isbn-1484228669-9781484228661-16112/
ebookball.com

Mastering Machine Learning with Python in Six Steps A


Practical Implementation Guide to Predictive Data
Analytics Using Python 1st Edition by Manohar Swamynathan
ISBN 1484228669 9781484228661
https://ebookball.com/product/mastering-machine-learning-with-python-
in-six-steps-a-practical-implementation-guide-to-predictive-data-
analytics-using-python-1st-edition-by-manohar-swamynathan-
isbn-1484228669-9781484228661-16088/
ebookball.com

Hands On Machine Learning With Scikit Learn and TensorFlow


Techniques and Tools to Build Learning Machines 1st
Edition by Aurélien Géron 9352135210 9789352135219
https://ebookball.com/product/hands-on-machine-learning-with-scikit-
learn-and-tensorflow-techniques-and-tools-to-build-learning-
machines-1st-edition-by-aura-c-lien-ga-c-
ron-9352135210-9789352135219-16084/
ebookball.com

Hands On Machine Learning with Scikit Learn and TensorFlow


Concepts Tools and Techniques to Build Intelligent Systems
1st Edition by Aurelien Geron ISBN 1491962291
9781491962299
https://ebookball.com/product/hands-on-machine-learning-with-scikit-
learn-and-tensorflow-concepts-tools-and-techniques-to-build-
intelligent-systems-1st-edition-by-aurelien-geron-
isbn-1491962291-9781491962299-16116/
ebookball.com

(EBook PDF) Deep Learning Machine Learning and IoT in


Biomedical and Health Informatics Techniques and
Applications 1st edition by Sujata Dash, Subhendu Kumar
Pani, Joel Rodrigues, Babita Majhi 1000534057
https://ebookball.com/product/ebook-pdf-deep-learning-machine-
9781000534054 full chapters
learning-and-iot-in-biomedical-and-health-informatics-techniques-and-
applications-1st-edition-by-sujata-dash-subhendu-kumar-pani-joel-
rodrigues-babita-majhi-1000534057/
ebookball.com
Deep Learning
with Applications
Using Python
Chatbots and Face, Object, and Speech
Recognition With TensorFlow and Keras

Navin Kumar Manaswi
Deep Learning with
Applications Using
Python
Chatbots and Face, Object,
and Speech Recognition
With TensorFlow and Keras

Navin Kumar Manaswi


Deep Learning with Applications Using Python
Navin Kumar Manaswi
Bangalore, Karnataka, India

ISBN-13 (pbk): 978-1-4842-3515-7 ISBN-13 (electronic): 978-1-4842-3516-4


https://doi.org/10.1007/978-1-4842-3516-4
Library of Congress Control Number: 2018938097

Copyright © 2018 by Navin Kumar Manaswi


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Celestin Suresh John
Development Editor: Matthew Moodie
Coordinating Editor: Divya Modi
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505,
e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub via the book’s product page, located at www.apress.
com/9781484235157. For more detailed information, please visit www.apress.com/source-code.
Printed on acid-free paper
Table of Contents
Foreword���������������������������������������������������������������������������������������������ix

About the Author���������������������������������������������������������������������������������xi


About the Technical Reviewer�����������������������������������������������������������xiii

Chapter 1: Basics of TensorFlow����������������������������������������������������������1


Tensors������������������������������������������������������������������������������������������������������������������2
Computational Graph and Session������������������������������������������������������������������������3
Constants, Placeholders, and Variables����������������������������������������������������������������6
Placeholders���������������������������������������������������������������������������������������������������������9
Creating Tensors�������������������������������������������������������������������������������������������������12
Fixed Tensors�������������������������������������������������������������������������������������������������13
Sequence Tensors�����������������������������������������������������������������������������������������14
Random Tensors��������������������������������������������������������������������������������������������15
Working on Matrices�������������������������������������������������������������������������������������������16
Activation Functions��������������������������������������������������������������������������������������������17
Tangent Hyperbolic and Sigmoid�������������������������������������������������������������������18
ReLU and ELU������������������������������������������������������������������������������������������������19
ReLU6������������������������������������������������������������������������������������������������������������20
Loss Functions����������������������������������������������������������������������������������������������������22
Loss Function Examples��������������������������������������������������������������������������������23
Common Loss Functions�������������������������������������������������������������������������������23

iii
Table of Contents

Optimizers�����������������������������������������������������������������������������������������������������������25
Loss Function Examples��������������������������������������������������������������������������������26
Common Optimizers��������������������������������������������������������������������������������������27
Metrics����������������������������������������������������������������������������������������������������������������28
Metrics Examples������������������������������������������������������������������������������������������28
Common Metrics�������������������������������������������������������������������������������������������29

Chapter 2: Understanding and Working with Keras���������������������������31


Major Steps to Deep Learning Models����������������������������������������������������������������32
Load Data������������������������������������������������������������������������������������������������������33
Preprocess the Data��������������������������������������������������������������������������������������33
Define the Model�������������������������������������������������������������������������������������������34
Compile the Model�����������������������������������������������������������������������������������������36
Fit the Model��������������������������������������������������������������������������������������������������37
Evaluate Model����������������������������������������������������������������������������������������������38
Prediction������������������������������������������������������������������������������������������������������38
Save and Reload the Model���������������������������������������������������������������������������39
Optional: Summarize the Model��������������������������������������������������������������������39
Additional Steps to Improve Keras Models���������������������������������������������������������40
Keras with TensorFlow����������������������������������������������������������������������������������������42

Chapter 3: Multilayer Perceptron�������������������������������������������������������45


Artificial Neural Network�������������������������������������������������������������������������������������45
Single-Layer Perceptron�������������������������������������������������������������������������������������47
Multilayer Perceptron������������������������������������������������������������������������������������������47
Logistic Regression Model����������������������������������������������������������������������������������49

iv
Table of Contents

Chapter 4: Regression to MLP in TensorFlow�������������������������������������57


TensorFlow Steps to Build Models����������������������������������������������������������������������57
Linear Regression in TensorFlow������������������������������������������������������������������������58
Logistic Regression Model����������������������������������������������������������������������������������62
Multilayer Perceptron in TensorFlow������������������������������������������������������������������65

Chapter 5: Regression to MLP in Keras����������������������������������������������69


Log-Linear Model������������������������������������������������������������������������������������������������69
Keras Neural Network for Linear Regression������������������������������������������������������71
Logistic Regression���������������������������������������������������������������������������������������������73
scikit-learn for Logistic Regression���������������������������������������������������������������74
Keras Neural Network for Logistic Regression����������������������������������������������74
Fashion MNIST Data: Logistic Regression in Keras���������������������������������������77
MLPs on the Iris Data������������������������������������������������������������������������������������������80
Write the Code�����������������������������������������������������������������������������������������������80
Build a Sequential Keras Model���������������������������������������������������������������������81
MLPs on MNIST Data (Digit Classification)����������������������������������������������������������84
MLPs on Randomly Generated Data��������������������������������������������������������������������88

Chapter 6: Convolutional Neural Networks�����������������������������������������91


Different Layers in a CNN������������������������������������������������������������������������������������91
CNN Architectures�����������������������������������������������������������������������������������������������95

Chapter 7: CNN in TensorFlow������������������������������������������������������������97


Why TensorFlow for CNN Models?����������������������������������������������������������������������97
TensorFlow Code for Building an Image Classifier for MNIST Data��������������������98
Using a High-Level API for Building CNN Models����������������������������������������������104

v
Table of Contents

Chapter 8: CNN in Keras�������������������������������������������������������������������105


Building an Image Classifier for MNIST Data in Keras��������������������������������������105
Define the Network Structure����������������������������������������������������������������������107
Define the Model Architecture���������������������������������������������������������������������108
Building an Image Classifier with CIFAR-10 Data���������������������������������������������110
Define the Network Structure����������������������������������������������������������������������111
Define the Model Architecture��������������������������������������������������������������������������112
Pretrained Models���������������������������������������������������������������������������������������������113

Chapter 9: RNN and LSTM�����������������������������������������������������������������115


The Concept of RNNs����������������������������������������������������������������������������������������115
The Concept of LSTM����������������������������������������������������������������������������������������118
Modes of LSTM�������������������������������������������������������������������������������������������������118
Sequence Prediction�����������������������������������������������������������������������������������������119
Sequence Numeric Prediction���������������������������������������������������������������������120
Sequence Classification������������������������������������������������������������������������������120
Sequence Generation����������������������������������������������������������������������������������121
Sequence-to-Sequence Prediction��������������������������������������������������������������121
Time-Series Forecasting with the LSTM Model������������������������������������������������122

Chapter 10: Speech to Text and Vice Versa��������������������������������������127


Speech-to-Text Conversion�������������������������������������������������������������������������������128
Speech as Data�������������������������������������������������������������������������������������������������128
Speech Features: Mapping Speech to a Matrix������������������������������������������������129
Spectrograms: Mapping Speech to an Image���������������������������������������������������131
Building a Classifier for Speech Recognition Through MFCC Features�������������132
Building a Classifier for Speech Recognition Through a Spectrogram�������������133
Open Source Approaches����������������������������������������������������������������������������������135

vi
Table of Contents

Examples Using Each API����������������������������������������������������������������������������������135


Using PocketSphinx�������������������������������������������������������������������������������������135
Using the Google Speech API�����������������������������������������������������������������������136
Using the Google Cloud Speech API�������������������������������������������������������������137
Using the Wit.ai API�������������������������������������������������������������������������������������137
Using the Houndify API��������������������������������������������������������������������������������138
Using the IBM Speech to Text API����������������������������������������������������������������138
Using the Bing Voice Recognition API����������������������������������������������������������139
Text-to-Speech Conversion�������������������������������������������������������������������������������140
Using pyttsx�������������������������������������������������������������������������������������������������140
Using SAPI���������������������������������������������������������������������������������������������������140
Using SpeechLib������������������������������������������������������������������������������������������140
Audio Cutting Code��������������������������������������������������������������������������������������141
Cognitive Service Providers������������������������������������������������������������������������������142
Microsoft Azure�������������������������������������������������������������������������������������������143
Amazon Cognitive Services�������������������������������������������������������������������������143
IBM Watson Services�����������������������������������������������������������������������������������144
The Future of Speech Analytics������������������������������������������������������������������������144

Chapter 11: Developing Chatbots�����������������������������������������������������145


Why Chatbots?��������������������������������������������������������������������������������������������������146
Designs and Functions of Chatbots������������������������������������������������������������������146
Steps for Building a Chatbot�����������������������������������������������������������������������������147
Preprocessing Text and Messages��������������������������������������������������������������148
Chatbot Development Using APIs����������������������������������������������������������������166
Best Practices of Chatbot Development������������������������������������������������������������169
Know the Potential Users����������������������������������������������������������������������������169
Read the User Sentiments and Make the Bot Emotionally Enriching����������169

vii
Table of Contents

Chapter 12: Face Detection and Recognition������������������������������������171


Face Detection, Face Recognition, and Face Analysis��������������������������������������172
OpenCV�������������������������������������������������������������������������������������������������������������172
Eigenfaces���������������������������������������������������������������������������������������������������173
LBPH������������������������������������������������������������������������������������������������������������175
Fisherfaces��������������������������������������������������������������������������������������������������176
Detecting a Face�����������������������������������������������������������������������������������������������177
Tracking the Face����������������������������������������������������������������������������������������������179
Face Recognition����������������������������������������������������������������������������������������������182
Deep Learning–Based Face Recognition����������������������������������������������������������185
Transfer Learning����������������������������������������������������������������������������������������������188
Why Transfer Learning?�������������������������������������������������������������������������������188
Transfer Learning Example��������������������������������������������������������������������������189
Calculate the Transfer Value������������������������������������������������������������������������191
APIs�������������������������������������������������������������������������������������������������������������������197

Appendix 1: Keras Functions for Image Processing�������������������������201

Appendix 2: Some of the Top Image Data Sets Available�����������������207

Appendix 3: Medical Imaging: DICOM File Format���������������������������211


W
 hy DICOM?�����������������������������������������������������������������������������������������������������211
What Is the DICOM File Format?�����������������������������������������������������������������������211

Index�������������������������������������������������������������������������������������������������213

viii
Foreword
Deep Learning has come a really long way. From the birth of the idea to
understand human mind and the concept of associationism — how we
perceive things and how relationships of objects and views influence our
thinking and doing, to the modelling of associationism which started in
the 1870s when Alexander Bain introduced the first concert of Artificial
Neural Networks by grouping the neurons.
Fast forward it to today 2018 and we see how Deep Learning has
dramatically improved and is in all forms of life — from object detection,
speech recognition, machine translation, autonomous vehicles, face
detection and the use of face detection from mundane tasks such as
unlocking your iPhoneX to doing more profound tasks such as crime
detection and prevention.
Convolutional Neural Networks and Recurrent Neural Networks
are shining brightly as they continue to help solve the world problems
in literally all industry areas such as Automotive & Transportation,
Healthcare & Medicine, Retail to name a few. Great progress is being made
in these areas and just metrics like these say enough about the palpability
of the deep learning industry:

–– Number of Computer Science academic papers have soared to almost


10x since 1996

–– VCs are investing 6x more in AI startups since 2000

–– There are 14x more active AI startups since 2000


–– AI related jobs market is hiring 5x more since 2013 and Deep Learning is
the most sought after skill in 2018

ix
Foreword

–– 84% of enterprises believe investing in AI will give them a great competi-


tive edge

And finally,

–– the error rate of image classification has dropped from 28% in 2012 to
2.5% in 2017 and it is going down all the time!

Still the research community is not satisfied. We are pushing


boundaries and I am moving ahead with my peers to develop models
around the bright and shiny Capsule Networks and give Deep Learning
a huge edge. I am not the only one in this battle. It is with great pleasure I
put this foreword for Navin, a respected professional in the Deep Learning
community I have come to know so well.
His book is coming just at the right moment. The industry as well as
learners are in need of practical means to strengthen their knowledge in
Deep Learning and apply in their job.
I am convinced that Navin’s book will give the learners what they need.
TensorFlow is increasingly becoming the market leader and Keras too is
being adopted by professionals to solve difficult problems in computer
vision and NLP (Natural Language Processing). There is no single
company on this planet who isn’t investing in these two application areas.
I look forward to this book being published and will be the first in line
to get it. And my advice to you is: you should too!

x
About the Author
Navin Kumar Manaswi has been developing
AI solutions with the use of cutting-­edge
technologies and sciences related to artificial
intelligence for many years. Having worked for
consulting companies in Malaysia, Singapore,
and the Dubai Smart City project, as well
as his own company, he has developed a
rare mix of skills for delivering end-to-end
artificial intelligence solutions, including
video intelligence, document intelligence, and
human-like chatbots. Currently, he solves B2B problems in the verticals of
healthcare, enterprise applications, industrial IoT, and retail at Symphony
AI Incubator as a deep learning AI architect. With this book, he wants to
democratize the cognitive computing and services for everyone, especially
developers, data scientists, software engineers, database engineers, data
analysts, and C-level managers.

xi
About the Technical Reviewer
Sundar Rajan Raman has more than 14 years
of full stack IT experience in machine
learning, deep learning, and natural language
processing. He has six years of big data
development and architect experience,
including working with Hadoop and
its ecosystems as well as other NoSQL
technologies such as MongoDB and
Cassandra. In fact, he has been the technical
reviewer of several books on these topics.
He is also interested in strategizing using Design Thinking principles
and coaching and mentoring people.

xiii
CHAPTER 1

Basics of TensorFlow
This chapter covers the basics of TensorFlow, the deep learning
framework. Deep learning does a wonderful job in pattern recognition,
especially in the context of images, sound, speech, language, and time-­
series data. With the help of deep learning, you can classify, predict,
cluster, and extract features. Fortunately, in November 2015, Google
released TensorFlow, which has been used in most of Google’s products
such as Google Search, spam detection, speech recognition, Google
Assistant, Google Now, and Google Photos. Explaining the basic
components of TensorFlow is the aim of this chapter.
TensorFlow has a unique ability to perform partial subgraph
computation so as to allow distributed training with the help of
partitioning the neural networks. In other words, TensorFlow allows model
parallelism and data parallelism. TensorFlow provides multiple APIs.
The lowest level API—TensorFlow Core—provides you with complete
programming control.
Note the following important points regarding TensorFlow:

• Its graph is a description of computations.

• Its graph has nodes that are operations.


• It executes computations in a given context of a session.

• A graph must be launched in a session for any


computation.

© Navin Kumar Manaswi 2018 1


N. K. Manaswi, Deep Learning with Applications Using Python,
https://doi.org/10.1007/978-1-4842-3516-4_1
Chapter 1 Basics of TensorFlow

• A session places the graph operations onto devices


such as the CPU and GPU.

• A session provides methods to execute the graph


operations.
For installation, please go to https://www.tensorflow.org/install/.
I will discuss the following topics:

T ensors
Before you jump into the TensorFlow library, let’s get comfortable with
the basic unit of data in TensorFlow. A tensor is a mathematical object
and a generalization of scalars, vectors, and matrices. A tensor can be
represented as a multidimensional array. A tensor of zero rank (order) is
nothing but a scalar. A vector/array is a tensor of rank 1, whereas a

2
Chapter 1 Basics of TensorFlow

matrix is a tensor of rank 2. In short, a tensor can be considered to be an


n-­dimensional array.
Here are some examples of tensors:

• 5: This is a rank 0 tensor; this is a scalar with shape [ ].


• [2.,5., 3.]: This is a rank 1 tensor; this is a vector
with shape [3].

• [[1., 2., 7.], [3., 5., 4.]]: This is a rank 2


tensor; it is a matrix with shape [2, 3].

• [[[1., 2., 3.]], [[7., 8., 9.]]]: This is a rank 3


tensor with shape [2, 1, 3].

Computational Graph and Session


TensorFlow is popular for its TensorFlow Core programs where it has two
main actions.

• Building the computational graph in the construction


phase

• Running the computational graph in the execution


phase

Let’s understand how TensorFlow works.

• Its programs are usually structured into a construction


phase and an execution phase.

• The construction phase assembles a graph that has


nodes (ops/operations) and edges (tensors).

• The execution phase uses a session to execute ops


(operations) in the graph.

3
Chapter 1 Basics of TensorFlow

• The simplest operation is a constant that takes no


inputs but passes outputs to other operations that do
computation.

• An example of an operation is multiplication


(or addition or subtraction that takes two matrices as
input and passes a matrix as output).

• The TensorFlow library has a default graph to which


ops constructors add nodes.

So, the structure of TensorFlow programs has two phases, shown here:

A computational graph is a series of TensorFlow operations arranged


into a graph of nodes.
Let’s look at TensorFlow versus Numpy. In Numpy, if you plan to
multiply two matrices, you create the matrices and multiply them. But in
TensorFlow, you set up a graph (a default graph unless you create another
graph). Next, you need to create variables, placeholders, and constant
values and then create the session and initialize variables. Finally, you feed
that data to placeholders so as to invoke any action.

4
Chapter 1 Basics of TensorFlow

To actually evaluate the nodes, you must run the computational graph
within a session.
A session encapsulates the control and state of the TensorFlow runtime.
The following code creates a Session object:

sess = tf.Session()

It then invokes its run method to run enough of the computational


graph to evaluate node1 and node2.
The computation graph defines the computation. It neither computes
anything nor holds any value. It is meant to define the operations
mentioned in the code. A default graph is created. So, you don’t need to
create it unless you want to create graphs for multiple purposes.
A session allows you to execute graphs or parts of graphs. It allocates
resources (on one or more CPUs or GPUs) for the execution. It holds the
actual values of intermediate results and variables.
The value of a variable, created in TensorFlow, is valid only within
one session. If you try to query the value afterward in a second session,
TensorFlow will raise an error because the variable is not initialized there.
To run any operation, you need to create a session for that graph. The
session will also allocate memory to store the current value of the variable

5
Chapter 1 Basics of TensorFlow

Here is the code to demonstrate:

Constants, Placeholders, and Variables


TensorFlow programs use a tensor data structure to represent all data—
only tensors are passed between operations in the computation graph. You
can think of a TensorFlow tensor as an n-dimensional array or list. A tensor
has a static type, a rank, and a shape. Here the graph produces a constant
result. Variables maintain state across executions of the graph.

6
Chapter 1 Basics of TensorFlow

Generally, you have to deal with many images in deep learning, so you
have to place pixel values for each image and keep iterating over all images.
To train the model, you need to be able to modify the graph to tune
some objects such as weight and bias. In short, variables enable you to
add trainable parameters to a graph. They are constructed with a type and
initial value.
Let’s create a constant in TensorFlow and print it.

Here is the explanation of the previous code in simple terms:

1. Import the tensorflow module and call it tf.

2. Create a constant value (x) and assign it the


numerical value 12.

3. Create a session for computing the values.

4. Run just the variable x and print out its current


value.
The first two steps belong to the construction phase, and the last two
steps belong to the execution phase. I will discuss the construction and
execution phases of TensorFlow now.
You can rewrite the previous code in another way, as shown here:

7
Chapter 1 Basics of TensorFlow

Now you will explore how you create a variable and initialize it. Here is
the code that does it:

Here is the explanation of the previous code:

1. Import the tensorflow module and call it tf.

2. Create a constant value called x and give it the


numerical value 12.

3. Create a variable called y and define it as being the


equation 12+11.

4. Initialize the variables with tf.global_variables_


initializer().

5. Create a session for computing the values.

6. Run the model created in step 4.


7. Run just the variable y and print out its current
value.

Here is some more code for your perusal:

8
Chapter 1 Basics of TensorFlow

Placeholders
A placeholder is a variable that you can feed something to at a later time. It
is meant to accept external inputs. Placeholders can have one or multiple
dimensions, meant for storing n-dimensional arrays.

Here is the explanation of the previous code:

1. Import the tensorflow module and call it tf.

2. Create a placeholder called x, mentioning the


float type.

3. Create a tensor called y that is the operation of


multiplying x by 10 and adding 500 to it. Note that
any initial values for x are not defined.

4. Create a session for computing the values.


5. Define the values of x in feed_dict so as to run y.

6. Print out its value.

In the following example, you create a 2×4 matrix (a 2D array) for


storing some numbers in it. You then use the same operation as before to
do element-wise multiplying by 10 and adding 1 to it. The first dimension
of the placeholder is None, which means any number of rows is allowed.

9
Chapter 1 Basics of TensorFlow

You can also consider a 2D array in place of the 1D array. Here is the
code:

This is a 2×4 matrix. So, if you replace None with 2, you can see the
same output.

But if you create a placeholder of [3, 4] shape (note that you will feed
a 2×4 matrix at a later time), there is an error, as shown here:

10
Chapter 1 Basics of TensorFlow

################# What happens in a linear model ##########


# Weight and Bias as Variables as they are to be tuned
W = tf.Variable([2], dtype=tf.float32)
b = tf.Variable([3], dtype=tf.float32)
# Training dataset that will be fed while training as Placeholders
x = tf.placeholder(tf.float32)
# Linear Model
y = W * x + b

Constants are initialized when you call tf.constant, and their values
can never change. By contrast, variables are not initialized when you call
tf.Variable. To initialize all the variables in a TensorFlow program, you
must explicitly call a special operation as follows.

It is important to realize init is a handle to the TensorFlow subgraph


that initializes all the global variables. Until you call sess.run, the
variables are uninitialized.

11
Chapter 1 Basics of TensorFlow

Creating Tensors
An image is a tensor of the third order where the dimensions belong to
height, width, and number of channels (Red, Blue, and Green).
Here you can see how an image is converted into a tensor:

12
Chapter 1 Basics of TensorFlow

You can generate tensors of various types such as fixed tensors,


random tensors, and sequential tensors.

Fixed Tensors
Here is a fixed tensor:

13
Chapter 1 Basics of TensorFlow

tf:.fill creates a tensor of shape (2×3) having a unique number.

tf.diag creates a diagonal matrix having specified diagonal elements.

tf.constant creates a constant tensor.

Sequence Tensors
tf.range creates a sequence of numbers starting from the specified value
and having a specified increment.

tf.linspace creates a sequence of evenly spaced values.

14
Chapter 1 Basics of TensorFlow

Random Tensors
tf.random_uniform generates random values from uniform distribution
within a range.

tf.random_normal generates random values from the normal


distribution having the specified mean and standard deviation.

15
Chapter 1 Basics of TensorFlow

Can you guess the result?

If you are not able to find the result, please revise the previous portion
where I discuss the creation of tensors.
Here you can see the result:

Working on Matrices
Once you are comfortable creating tensors, you can enjoy working on
matrices (2D tensors).

16
Chapter 1 Basics of TensorFlow

Activation Functions
The idea of an activation function comes from the analysis of how a
neuron works in the human brain (see Figure 1-1). The neuron becomes
active beyond a certain threshold, better known as the activation potential.
It also attempts to put the output into a small range in most cases.
Sigmoid, hyperbolic tangent (tanh), ReLU, and ELU are most popular
activation functions.
Let’s look at the popular activation functions.

17
Chapter 1 Basics of TensorFlow

Tangent Hyperbolic and Sigmoid


Figure 1-2 shows the tangent hyperbolic and sigmoid activation functions.

Figure 1-1. An activation function

Figure 1-2. Two popular activation functions

18
Chapter 1 Basics of TensorFlow

Here is the demo code:

R
 eLU and ELU
Figure 1-3 shows the ReLU and ELU functions.

Figure 1-3. The ReLU and ELU functions

19
Chapter 1 Basics of TensorFlow

Here is the code to produce these functions:

ReLU6
ReLU6 is similar to ReLU except that the output cannot be more than six ever.

Note that tanh is a rescaled logistic sigmoid function.

20
Chapter 1 Basics of TensorFlow

21
Chapter 1 Basics of TensorFlow

Loss Functions
The loss function (cost function) is to be minimized so as to get the best
values for each parameter of the model. For example, you need to get the
best value of the weight (slope) and bias (y-intercept) so as to explain the
target (y) in terms of the predictor (X). The method is to achieve the best
value of the slope, and y-intercept is to minimize the cost function/loss
function/sum of squares. For any model, there are numerous parameters,
and the model structure in prediction or classification is expressed in
terms of the values of the parameters.
You need to evaluate your model, and for that you need to define the
cost function (loss function). The minimization of the loss function can
be the driving force for finding the optimum value of each parameter. For

22
Chapter 1 Basics of TensorFlow

regression/numeric prediction, L1 or L2 can be the useful loss function.


For classification, cross entropy can be the useful loss function. Softmax or
sigmoid cross entropy can be quite popular loss functions.

Loss Function Examples


Here is the code to demonstrate:

Common Loss Functions


The following is a list of the most common loss functions:

tf.contrib.losses.absolute_difference

tf.contrib.losses.add_loss

23
Chapter 1 Basics of TensorFlow

tf.contrib.losses.hinge_loss

tf.contrib.losses.compute_weighted_loss

tf.contrib.losses.cosine_distance

tf.contrib.losses.get_losses

tf.contrib.losses.get_regularization_losses

tf.contrib.losses.get_total_loss

tf.contrib.losses.log_loss

tf.contrib.losses.mean_pairwise_squared_error

tf.contrib.losses.mean_squared_error

tf.contrib.losses.sigmoid_cross_entropy

tf.contrib.losses.softmax_cross_entropy

tf.contrib.losses.sparse_softmax_cross_entropy

tf.contrib.losses.log(predictions,labels,weight=2.0)

24
Chapter 1 Basics of TensorFlow

Optimizers
Now you should be convinced that you need to use a loss function to
get the best value of each parameter of the model. How can you get the
best value?
Initially you assume the initial values of weight and bias for the model
(linear regression, etc.). Now you need to find the way to reach to the
best value of the parameters. The optimizer is the way to reach the best
value of the parameters. In each iteration, the value changes in a direction
suggested by the optimizer. Suppose you have 16 weight values (w1, w2,
w3, …, w16) and 4 biases (b1, b2, b3, b4). Initially you can assume every
weight and bias to be zero (or one or any number). The optimizer suggests
whether w1 (and other parameters) should increase or decrease in the
next iteration while keeping the goal of minimization in mind. After many
iterations, w1 (and other parameters) would stabilize to the best value
(or values) of parameters.
In other words, TensorFlow, and every other deep learning framework,
provides optimizers that slowly change each parameter in order to
minimize the loss function. The purpose of the optimizers is to give
direction to the weight and bias for the change in the next iteration.
Assume that you have 64 weights and 16 biases; you try to change the
weight and bias values in each iteration (during backpropagation) so that
you get the correct values of weights and biases after many iterations while
trying to minimize the loss function.
Selecting the best optimizer for the model to converge fast and to learn
weights and biases properly is a tricky task.
Adaptive techniques (adadelta, adagrad, etc.) are good optimizers
for converging faster for complex neural networks. Adam is supposedly
the best optimizer for most cases. It also outperforms other adaptive
techniques (adadelta, adagrad, etc.), but it is computationally costly. For
sparse data sets, methods such as SGD, NAG, and momentum are not the
best options; the adaptive learning rate methods are. An additional benefit

25
Chapter 1 Basics of TensorFlow

is that you won’t need to adjust the learning rate but can likely achieve the
best results with the default value.

Loss Function Examples


Here is the code to demonstrate:

26
Chapter 1 Basics of TensorFlow

Common Optimizers
The following is a list of common optimizers:

27
Chapter 1 Basics of TensorFlow

Metrics
Having learned some ways to build a model, it is time to evaluate the
model. So, you need to evaluate the regressor or classifier.
There are many evaluation metrics, among which classification
accuracy, logarithmic loss, and area under ROC curve are the most popular
ones.
Classification accuracy is the ratio of the number of correct predictions
to the number of all predictions. When observations for each class are not
much skewed, accuracy can be considered as a good metric.

tf.contrib.metrics.accuracy(actual_labels, predictions)

There are other evaluation metrics as well.

Metrics Examples
This section shows the code to demonstrate.
Here you create actual values (calling them x) and predicted values
(calling them y). Then you check the accuracy. Accuracy represents the
ratio of the number of times the actual equals the predicted values and
total number of instances.

28
Chapter 1 Basics of TensorFlow

Common Metrics
The following is a list of common metrics:

29
Chapter 1 Basics of TensorFlow

30
CHAPTER 2

Understanding and
Working with Keras
Keras is a compact and easy-to-learn high-level Python library for deep
learning that can run on top of TensorFlow (or Theano or CNTK). It
allows developers to focus on the main concepts of deep learning, such
as creating layers for neural networks, while taking care of the nitty-gritty
details of tensors, their shapes, and their mathematical details. TensorFlow
(or Theano or CNTK) has to be the back end for Keras. You can use Keras
for deep learning applications without interacting with the relatively
complex TensorFlow (or Theano or CNTK). There are two major kinds
of framework: the sequential API and the functional API. The sequential
API is based on the idea of a sequence of layers; this is the most common
usage of Keras and the easiest part of Keras. The sequential model can be
considered as a linear stack of layers.
In short, you create a sequential model where you can easily add
layers, and each layer can have convolution, max pooling, activation, drop-­
out, and batch normalization. Let’s go through major steps to develop
deep learning models in Keras.

© Navin Kumar Manaswi 2018 31


N. K. Manaswi, Deep Learning with Applications Using Python,
https://doi.org/10.1007/978-1-4842-3516-4_2
Chapter 2 Understanding and Working with Keras

Major Steps to Deep Learning Models


The four core parts of deep learning models in Keras are as follows:

1. Define the model. Here you create a sequential


model and add layers. Each layer can contain one
or more convolution, pooling, batch normalization,
and activation function.

2. Compile the model. Here you apply the loss


function and optimizer before calling the compile()
function on the model.

3. Fit the model with training data. Here you train the
model on the test data by calling the fit() function
on the model.

4. Make predictions. Here you use the model to


generate predictions on new data by calling
functions such as evaluate() and predict().

There are eight steps to the deep learning process in Keras:

1. Load the data.

2. Preprocess the data.

3. Define the model.

4. Compile the model.

5. Fit the model.

6. Evaluate the model.

7. Make the predictions.


8. Save the model.

32
Chapter 2 Understanding and Working with Keras

Load Data
Here is how you load data:

Preprocess the Data


Here is how you preprocess data:

33
Chapter 2 Understanding and Working with Keras

D
 efine the Model
Sequential models in Keras are defined as a sequence of layers. You
create a sequential model and then add layers. You need to ensure the
input layer has the right number of inputs. Assume that you have 3,072
input variables; then you need to create the first hidden layer with 512
nodes/neurons. In the second hidden layer, you have 120 nodes/neurons.
Finally, you have ten nodes in the output layer. For example, an image
maps onto ten nodes that shows the probability of being label1 (airplane),
label2 (automobile), label3 (cat), …, label10 (truck). The node of highest
probability is the predicted class/label.

One image has three channels (RGB), and in each channel, the
image has 32×32 = 1024 pixels. So, each image has 3×1024 = 3072 pixels
(features/X/inputs).
With the help of 3,072 features, you need to predict the probability of
label1 (Digit 0), label2 (Digit 1), and so on. This means the model predicts
ten outputs (Digits 0–9) where each output represents the probability of
the corresponding label. The last activation function (sigmoid, as shown
earlier) gives 0 for nine outputs and 1 for only one output. That label is the
predicted class for the image (Figure 2-1).
For example, 3,072 features ➤ 512 nodes ➤ 120 nodes ➤ 10 nodes.

34
Chapter 2 Understanding and Working with Keras

Figure 2-1. Defining the model

The next question is, how do you know the number of layers to use and
their types? No one has the exact answer. What’s best for evaluation metrics is
that you decide the optimum number of layers and the parameters and steps
in each layer. A heuristics approach is also used. The best network structure
is found through a process of trial-and-error experimentation. Generally, you
need a network large enough to capture the structure of the problem.

35
Chapter 2 Understanding and Working with Keras

In this example, you will use a fully connected network structure with
three layers. A dense class defines fully connected layers.
In this case, you initialize the network weights to a small random
number generated from a uniform distribution (uniform) in this
case between 0 and 0.05 because that is the default uniform weight
initialization in Keras. Another traditional alternative would be normal for
small random numbers generated from a Gaussian distribution. You use or
snap to a hard classification of either class with a default threshold of 0.5.
You can piece it all together by adding each layer.

Compile the Model


Having defined the model in terms of layers, you need to declare the loss
function, the optimizer, and the evaluation metrics. When the model is
proposed, the initial weight and bias values are assumed to be 0 or 1, a
random normally distributed number, or any other convenient numbers.
But the initial values are not the best values for the model. This means the
initial values of weight and bias are not able to explain the target/label in
terms of predictors (Xs). So, you want to get the optimal value for the model.
The journey from initial values to optimal values needs a motivation, which
will minimize the cost function/loss function. The journey needs a path
(change in each iteration), which is suggested by the optimizer. The journey
also needs an evaluation measurement, or evaluation metrics.

Popular loss functions are binary cross entropy, categorical cross


entropy, mean_squared_logarithmic_error and hinge loss. Popular
optimizers are stochastic gradient descent (SGD), RMSProp, adam,
adagrad, and adadelta. Popular evaluation metrics are accuracy, recall,
and F1 score.
36
Chapter 2 Understanding and Working with Keras

In short, this step is aimed at tuning the weights and biases based on
loss functions through iterations based on the optimizer evaluated by
metrics such as accuracy.

Fit the Model


Having defined and compiled the model, you need to make predications
by executing the model on some data. Here you need to specify the
epochs; these are the number of iterations for the training process to run
through the data set and the batch size, which is the number of instances
that are evaluated before a weight update. For this problem, the program
will run for a small number of epochs (10), and in each epoch, it will
complete 50(=50,000/1,000) iterations where the batch size is 1,000 and the
training data set has 50,000 instances/images. Again, there is no hard rule
to select the batch size. But it should not be very small, and it should be
much less than the size of the training data set to consume less memory.

37
Another Random Document on
Scribd Without Any Related Topics
Huhuu! huhuu!
Lapio vaan on tarpeen
Huhuu! huhuu!

Kapakassa Rzepa niinikään keikkui muita ylinnä. Hän piti viinasta


ja oli paha tappelemaan, kun päihtyi. Kerran hän puhkasi erään
kartanon rengin päähän sellaisen reiän, että emännöitsijä vannoi
voivansa sen läpi nähdä hänen sielunsa. Kerran joutui hän kapakassa
tappeluun irtolaisten kanssa — hän oli silloin tuskin seitsemäntoista
vuoden vanha. Herra Skorabiewski, joka siihen aikaan vielä oli
lautamiehenä, kutsutti hänet kansliaan, veti häntä pari kertaa
korvalle — vaikka vaan näön vuoksi — ja kysyi leppeästi:

— Taivaan tähden, Rzepa, mitenkä sinä saatoit tulla toimeen


heidän kanssaan, heitähän oli seitsemän?

— Kas, hyvä herra, vastasi Rzepa, — heidän jalkansa olivat


marssimisesta niin veltostuneet, että kun vaan vähänkin tönäsi, niin
kaatuivat siihen paikkaan.

Herra Skorabiewski sovitti asian. Hän oli ennenkin kohdellut


Rzepaa tavattoman suosiollisesti. Akat kuiskuttelivat keskenään, että
Rzepa on hänen poikansa: "näkeehän sen tok' paikalla, että siinä
hunsvotissa on aatelisvertä."

Mutta se ei ollut totta, vaikka kaikki tunsivatkin Rzepan äidin eikä


kukaan hänen isäänsä. Rzepa itse oli vuokrannut mökin ja kolme
morgia maata, jotka hän sittemmin hankki omakseen. Nyt hallitsi
hän isäntänä omaa maatilkkuaan ja koska hän oli reiru mies, niin
hän tuli toimeen kutakuinkin. Hän meni naimisiin ja sai niin hyvän
vaimon, ettei parempaa olisi löytänyt, vaikka olisi hakenut kynttilä
kädessä. Hänen asiansa olisivat siis olleet mainiolla kannalla, jollei
hän vähän liiaksi olisi pitänyt viinasta.

Mutta häntä ei ollut neuvominen. Jos joku yrittikään varoittaa, niin


hän paikalla vastasi:

— Juon omillani, mitä se teihin kuuluu?

Hän ei pelännyt ketään koko kylässä, paitsi kirjuria. Kun hän vaan
kaukaakin näki vihriäraitaisen lakin, pystyn nokan ja pienen
pukinparran korkeilla jaloillaan ja hiljalleen likenevän, niin hän
paikalla kävi kiinni lakkiinsa. Kirjuri tiesi hänestäkin pienen jutun.
Kerran myrskyisinä aikoina oli Rzepaa käsketty viemään eräitä
papereita johonkin ja hän oli ne vienyt. Sen enempää hän ei niistä
tietänyt. Olihan hän siihen aikaan vasta viidentoista vanha poika ja
paimensi hanhia ja sikoja. Mutta myöhemmin hän tuli ajatelleeksi,
että häntä ehkä sentään vaaditaan tilinteolle noitten paperien
kuljetuksesta ja sentähden hän pelkäsi kirjuria.

Tällainen henkilö oli Rzepa.

Kun hän nyt tänäpänä palasi kotiin metsästä, karkasi vaimo


suurella itkulla häntä vastaan ja alkoi:

— Voi sinua onnetonta, eivät silmäni enään kauvankaan saa sinua


katsella, en saa paitojasi pestä, en ruokaasi keittää. Sinä menet,
onneton, kaiken maailman tietä.

Rzepa hämmästyi.

— Mitä sinä hulluttelet, vaimo, sanoi hän, — oletko syönyt


piparjuurta tai onko sinua ampiainen pistänyt.
— En ole syönyt piparjuurta eikä minua ampiainen ole pistänyt,
mutta kirjuri kävi täällä ja sanoi, ettei sinua enään mikään pelasta
sotaväestä… Voi, voi, kyllä sinä nyt menet kaiken maailman tietä!

Rzepa rupesi tarkemmin kyselemään ja vaimo kertoi hänelle


kaikki.
Ainoastaan kirjurin hakkailemisen hän salasi, sillä hän pelkäsi, että
Rzepa sanoisi kirjurille jotakin tyhmyyksiä tai ehkä karkaisi hänen
niskaansa. Jumala varjelkoon! Siitä ei asia paraneisi!

— Sinä olet hullu! sanoi Rzepa vihdoin — mitä sinä itket? ei ne


minua sotaväkeen vie, sillä enhän minä enään siinä iässä ole; ja
onhan minulla lisäksi mökki ja maata ja vaimo hupakko ja tuo
pahankurinen pikku rapu tuossa…

Hän osoitti kehtoa jossa "pahankurinen rapu", s.o. tukeva, vuoden


vanha poikanen vallattomasti liikutteli jalkojaan ja kirkui, jotta ihan
korvat olivat mennä lukkoon.

Vaimo pyyhki silmänsä esiliinalla ja lausui:

— Mitä siitä? Kyllä hän tietää, että sinä kannoit ne paperit toisesta
metsästä toiseen.

Rzepa raapasi korvallistaan.

— Taitaa vaan tietää.

Hetkisen perästä hän jatkoi:

— Lähdenpä itse puhumaan hänelle. Ehkei se nyt ole niin


vaarallista.
— Mene, mene, kehoitti vaimo. — Mutta ota rupla mukaasi. Älä
mene hänen luokseen ilman ruplaa.

Rzepa otti rasiasta ruplan ja läksi herra kirjurin luo.

Kirjuri oli nuorimies, hänellä ei siis ollut omaa taloutta, vaan hän
asui neliskulmaisessa, niinkutsutussa "rapatussa talossa", joka oli
lammin rannalla. Hänellä oli siellä erityinen etehinen ja kaksi
huonetta. Ensimmäisessä huoneessa ei ollut muuta kuin hiukan olkia
ja päällyssaappaat. Toista huonetta käytettiin sekä salina että
makuuhuoneena. Vuode näytti siltä kuin ei sitä ikinä olisi järjestetty,
tyynyissä ei ollut vaaruja ja höyhenet pistivät esiin. Vuoteen vieressä
oli pöytä, pöydällä mustepullo, kyniä, kansliakirjoja, muutama vihko
herra Breslauerin kustantamaa Isabella Espanjalaista, kaksi likaista
englantilaista kaulusta, pomaadapurkki, paperossihylssyjä ja lopuksi
talikynttilä, joka seisoi läkkisessä jalassa ja jonka sydän oli
ruskeahtava; kärpäsiä oli hukkunut taliin kynttilän sydämen
ympärille.

Ikkunan luona riippui suurehko peili ja vastapäätä ikkunaa oli


piironki, jonka päälle herra kirjurin hienonhieno vaatevarasto oli
sälytetty: siinä oli kaikenkarvaisia housuja, satumaisen kauniita
liivejä, kaulaliinoja, hansikkaita, lakeerisaappaita, jopa
silinterihattukin, jota herra kirjuri käytti, kun hänen piti esiintyä
Aasinkorvan piirikaupungissa.

Tällä hetkellä oli tuolilla vuoteen vieressä myöskin herra kirjurin


nankini-kankaasta valmistetut housut ja liivit. Itse herra kirjuri oli
pitkänään sängyssä ja luki paraikaa "Isabella Espanjalaista", joka oli
ilmestynyt herra Breslauerin kustannuksella.
Hän — nimittäin ei herra Breslauer vaan herra kirjuri — oli
surkeassa tilassa; hänen tilansa oli niin surkea, ettei sitä surkeutta
pystyisi kuvaamaan kuin Victor Hugo'n kynä. Hänen haavaansa
pakotti vimmatusti. Isabellan lukeminen oli aina ennen tuottanut
hänelle suurinta huvia ja virkistystä, mutta nyt se vaan enensi tuskaa
ja kiihoitti katkeruutta, jonka kohtaus Mustin kanssa oli synnyttänyt.
Hänellä oli hiukan haavakuumetta ja hän ei millään tahtonut saada
ajatuksiaan pysymään koossa. Tuontuostakin näki hän kauheita
näkyjä. Hän oli juuri lukenut nuoren Serranon tulosta Escorialiin: hän
on saanut loistavan voiton karlisteista ja hän on täynnä haavoja.
Nuori Isabella ottaa hänet vastaan kalpeana, mielenliikutuksissaan.
Harsokangas kohoilee kiihkeästi hänen rinnoillaan.

— Kenraali, oletko haavoitettu? kysyy hän Serranolta ja hänen


äänensä vapisee.

Onneton Zolzikiewioz kuvittelee tällä hetkellä olevansa Serrano.

— Voi, voi, olen! vastaa hän ääntänsä hilliten. — Suo anteeksi,


kuningatar! Varjelkoon sinua korkein…

— Lepää, kenraali! Istuudu! Kerro minulle sankartöistäsi.

— Kertoa minä kyllä voin, mutta en millään muotoa istuutua,


huudahtaa epätoivoissaan Serrano… Suo anteeksi, kuningatar! Se
kirottu Musti… tarkoitan: Don José… Voi, voi, voi!

Nyt mielikuvien täytyi väistyä kivun tieltä. Serrano katsahti


ympärilleen: pöydällä palaa kynttilä, joka ritisee ja räiskii, sillä taliin
tarttunut kärpänen on juuri syttynyt palamaan; seinillä kulkee toisia
kärpäsiä. Onko hän siis kotona eikä Escorialissa? Eikö kuningatar
Isabella olekaan täällä? Nyt herra Zolzikiewicz vasta herää täyteen
tajuntaan, nousee istumaan vuoteelleen, kastaa liinasen vesiastiaan
joka on sängyn alla ja muuttaa käärettä.

Sitte hän kääntyy seinään päin, menee uneen ja mielikuvittelu vie


hänet taaskin, puoleksi unessa, puoleksi valveilla, ylimääräisellä
kyydillä Escorialiin.

— Kallis Serrano! armaani! tahdon itse hoitaa haavasi, kuiskaa


kuningatar.

Hiukset Serranon päässä nousevat pystyyn. Hän tuntee asemansa


koko surkeuden. Mitä tehdä? Kieltäytyäkö täyttämästä kuningattaren
pyyntöä tai antautuako hänen vaalittavakseen? Kylmä hiki nousee
hänen otsalleen, kun äkkiä…

Äkkiä kuningatar katoaa, ovi avautuu naristen ja kynnykselle astuu


Serranon leppymätön vihollinen, Don José.

— Mitä sinä tahdot? Kuka olet? huutaa Serrano.

— Minä vaan, Rzepa! vastaa synkästi Don José.

Zolzikiewicz herää; Escorial muuttuu taas hänen tavalliseksi


asunnokseen. Kynttilä palaa pöydällä, kärpänen, joka on tarttunut
sydämeen, ritisee ja ratisee sinertävässä valossa, ovella seisoo Rzepa
ja hänen takaansa… voi kauhistus! näkyy oven raosta Mustin pää.

Peto iskee silmänsä herra Zolzikiewicziin ja näyttää nauravan.

Herra Zolzikiewiczin kasvoilla on kylmä hiki ja hänen päähänsä


lentää ajatus: Rzepa on tullut tänne hakatakseen poikki jalkani ja
Musti…
— Mitä te molemmat täältä haette? huutaa hän kauhistuksissaan.

Mutta Rzepa laskee ruplan pöydälle ja vastaa nöyrästi:

— Armollinen kirjuri! Minä tulin vaan puhumaan siitä


sotamiesotosta.

— Ulos, ulos, ulos! huusi Zolzikiewicz, joka äkkiä sai takaisin


rohkeutensa.

Vimmoissaan aikoi hän karata Rzepan niskaan, mutta karlistilaista


haavaa vihlasi silloin niin kipeästi, että hänen täytyi laskeutua
takaisin vuoteeseen. Eikä sieltä enään kuulunut kuin hiljainen valitus:

— Voi, voi, voi!


III.

Sankari keksii keinon.

Haava ärtyi.

Arvaan että ihanat lukijattaret jo alkavat itkeä kertomukseni


sankaria. Riennän sentähden ilmoittamaan, ennenkuin joku ehtii
pyörtyä, ettei haava kuitenkaan tappanut sankaria. Hänelle oli vielä
sallittu pitkä elonaika. Jos hän olisi kuollut, niin minä tietysti olisin
heittänyt kynän nurkkaan ja lopettanut koko kertomuksen. Mutta
koska hän ei kuollut, niin minä jatkan.

Haava siis ärtyi ja rupesi tekemään märkää, mutta vastoin kaikkea


odotusta koitui siitäkin uusi etu Pässinpään kylän kirjurille. Asiain
kulku oli sangen yksinkertainen. Märän kanssa meni paha tuuli
päästä pois. Zolzikiewicz alkoi siis ajatella selvemmin ja huomasi
silloin, että hän tähän asti oli tehnyt pelkkiä tyhmyyksiä. Kuulkaappa
vaan! Kanslianpäällikkö oli pannut päänsä pantiksi siitä, että hän
voittaa itselleen Rzepan vaimon. Tämä halu ei ollut ensinkään
hämmästyttävä, sillä toista niin kaunista naista ei löytynyt koko
Aasinkorvan piirikunnassa, mutta siksi tahtoi Zolzikiewicz saada
Rzepan pois tieltä. Kun Rzepa viedään sotaväkeen, niin koittaa
kanslianpäällikölle ilonpäivät. Mutta ei ole ensinkään helppoa
herrastuomarin pojan sijasta pistää Rzepan nimeä listoihin. Kirjuri on
aina mahtimies ja Zolzikiewicz on kirjureidenkin joukossa mahtimies,
mutta onnettomuudeksi hän ei ollut viimeisenä virkamiehenä
ratkaisemassa sotamiesottoa. Tässä piti joutua tekemisiin
maapoliisin, sotamieskomissionin, piiripäällikön ja maapoliisipäällikön
kanssa. Kellään näistä henkilöistä ei ollut vähintäkään syytä
lahjoittaa armeijalle ja valtakunnalle Rzepaa Burakin sijasta. "Jos
hänet panisi asevelvollisuuslistaan. Mutta entä sitte?" mietti
miellyttävä sankarimme itsekseen. Luettelot tarkastetaan, niihin
liitetään ote henkikirjoista ja koska ei Rzepan suuta saata tukkia, niin
minä saan pitkän nenän, minut potkaistaan pois kirjurintoimesta ja
siinä lorun loppu.

Suurimmatkin miehet ovat intohimon vallassa tehneet tyhmyyksiä,


mutta heidän suuruutensa on perustunut juuri siihen, että he ajoissa
ovat arvanneet oman tilansa. Zolzikiewicz myönsi tehneensä
ensimmäisen tyhmyytensä silloin, kun oli luvannut herrastuomarille
pistää Rzepan sotilasluetteloihin. Toisen tyhmyytensä oli hän tehnyt
silloin, kun hän meni Rzepan vaimon luo ja ahdisti häntä hänen
loukuttaessaan pellavia. Pelotellessaan häntä ja hänen miestänsä
asevelvollisuudella, oli hän tehnyt kolmannen tyhmyyden. Oi ylevää
hetkeä, jona todella suuri mies lausuu itselleen: "minä olen aasi!" —
tämä hetki oli nyt koittanut Pässinpään kylälle, se oli lentänyt sinne
kuin siivillä, tullut siitä maasta, jossa ylevyys ja jalous kulkevat
käsikädessä, sillä Zolzikiewicz sanoi itselleen suoraan: "minä olen
aasi!" Mutta olisiko hänen pitänyt luopua suunnitelmasta, jonka
tähden hän jo oli vuodattanut vertansa (innoissaan tuli hän
sanoneeksi "sydänvertansa"), olisiko hänen pitänyt luopua
tuumastaan, uhrattuaan sen tähden uudet housunsa, joita hän ei
vielä ollut räätäli Srulille edes maksanut, ja alushousunsa, jotka
hänellä, tietääkseen, vasta pari kertaa oli ollut jalassa?

Ei ikinä! Päinvastoin tahtoi hän kostaa sekä Rzepalle että hänen


vaimolleen ja Mustillekin. Zolzikiewicz vannoi, että hän on narri, jollei
hän vielä kärvennä Rzepan nahkaa. Koko ensimmäisen päivän,
muuttaessaan kääreitä, hän mietti, mietti toisen, muuttaessaan
kääreitä, mietti vielä kolmannenkin, muuttaessaan kääreitä — ja
tiedättekö mihinkä päätökseen hän tuli? Hän ei tullut mihinkään
päätökseen. Neljäntenä päivänä toi kanslianpalvelija Aasinkorvan
apteekista laastaria. Zolzikiewicz levitti sitä liinakankaalle, pani
paiseen päälle ja, voi ihme, kuinka tämä lääke vaikutti! melkein
samassa hetkessä hän huudahti: "nyt olen sen keksinyt!" Hän oli
todella tehnyt keksinnön.
IV.

Peto pauloissa.

Muutamia päiviä myöhemmin — en oikein muista, olisiko ollut


viidentenä vaiko kuudentena päivänä — istuivat herrastuomari
Burak, lautamies Gomula ja nuori Rzepa Pässinpään kapakan
kulmakamarissa. Herrastuomari tarttui lasiinsa.

— Heittäisittepä nyt riitanne, virkkoi hän, — kun ei ole mitään


syytä riitaan.

— Mutta sen minä sanon, ettei ranskalainen anna perään


preussiläiselle, sanoi Gomula, iskien nyrkkinsä pöytään.

— Preussiläiskoirat ovat viekasta väkeä! sanoi Rzepa.

— Mitä heidän viekkaudestaan? Turkkilainen auttaa Ranskaa ja


turkkilainen se sittenkin on niistä kaikista väkevin.

— Mitä turhia! Väkevin kaikista on Garibaldi.

— Se oli oikein osattu. Mutta mistä te sen Garibaldin keksitte?


— Mitä keksimistä hänessä olisi? Ovathan ihmiset jo kauvan
puhuneet, kuinka hän suurella laivastolla ja voimalla seilasi pitkin
Veikseliä. Mutta ei kuulunut pitäneen varsovalaisesta oluesta, kun
kotona saa parempaa. Sentähden hän kääntyikin takaisin.

— Älkää lörpötelkö! Kaikki saksalaiset ovat juutalaisia.

— Mutta Garibaldi ei ole mikään saksalainen.

— Mikä hän sitte on?

— Mikäkö on? Keisari hän on!

— Voi sitä kauheata viisautta!

— Te ette ole ensinkään viisaampi!

— No, koska olette olevinanne niin kovin viisas, niin sanokaa, mikä
oli ensimmäisen ihmisen nimi?

— Jaa mikäkö oli ensimmäisen ihmisen nimi? Aatami.

— Niin, se oli ristimänimi, mutta entä liikanimi?

— Mistä minä sen tiedän.

— Kas niin! Mutta minäpä tiedän. Hänen liikanimensä oli:


"Nieleväinen."

— Jo te nyt puhutte hulluja!

— Jollette usko, niin kuulkaa:


"Meren tähti, emo Herran,
Armollas jok' autoit kerran
Ihmisistä ensimmäisen
Nieleväise
Synnin suosta, surman vuosta."

— No, eikö se nyt ollut?

— Taisi vaan olla!

— Parempi olisi, että kallistaisitte lasejanne! huudahti


herrastuomari.

— Maljanne, kuomaseni!

— Maljanne!

— Haim!

— Siulim![9]

— Onneks' olkoon!

He joivat kaikki kolme, mutta koska siihen aikaan juuri oli sota
Ranskan ja Preussin välillä, niin lautamies Gomula taasen palasi
politiikkaan.

— No! juodaan nyt vielä! virkkoi hetkisen perästä Burak.

— Onneks' olkoon!

— Kost' jumala!

— No, teidän terveydeksenne!


Taasen he joivat aarakkilasit pohjaan. Äkkiä Rzepa kolautti
tyhjennettyä lasiaan pöytään ja huusi:

— Hei vaan, se oli helkkarin makeaa!

— Otetaankos vielä? huusi Burak.

— Antaa tulla!

Rzepan kasvot kävivät yhä punaisemmiksi, Burak täytti


täyttämistään hänen lasiansa.

— Kuulkaappas, lausui hän vihdoin Rzepalle, — vaikka te nyt


yhdellä kädellä heilautattekin nelikon herneitä selkäänne, niin taitaisi
sentään peloittaa lähteä sotaan.

— Mitä vielä! Saisihan sitä tapellakin, jos niiksi tulisi!

— Moni on mies päältä pieni, sanoi Gomula, — mutta rohkea


sisältä; moni on myöskin suuren ja muhkean näköinen, mutta pelkuri
mieleltään.

— Valehtelette! huusi Rzepa, — minä en pelkää!

— Mikä teidän tietää! sanoi Gomula.

— Mutta minäpä sanon, tulistui Rzepa ja näytti nyrkkiään, joka oli


kuin paksu leivänkimpale, — että jos minä tällä karkaisin
kimppuunne, niin te hajoaisitte kuin ravistunut tynnöri.

— Ei ole sanottu.

— Tahdotteko koettaa?
— Olkaa siivolla, keskeytti nyt herrastuomari. — Oikeinko te aiotte
tapella? Juodaan pois vielä.

Ja he joivat taasen, mutta Burak ja Gomula vain kostuttivat


huuliaan, kun sensijaan Rzepa nielasi koko lasillisen aarakkia. Hänen
silmissään alkoi säkenöidä.

— Sopikaa nyt pois! kehoitti herrastuomari.

Syleillessään ja suudellessaan riitatoveriaan Rzepa purskahti


itkuun. Hän ei itkenyt muuta kuin silloin kun hän oli aika lailla
juovuksissa; nyt alkoi hän haikeasti valittaa ja vaikeroida lihavaa
vasikkaa, joka häneltä oli kuollut pari viikkoa sitte eräänä yönä
navetassa.

— Voi, voi, minkä vasikan Jumala minulta korjasi! sanoi hän


surullisesti.

— No, älä sinä sure! virkkoi Burak. — Kirjurille on jo paperi


saapunut siitä että ehkä kartanon metsä lankeaa kunnan omaksi.

— Se on oikeus ja kohtuus, vastasi Rzepa. — Kartanon herra ei ole


kylvänyt sitä metsää.

Hetkisen perästä hän taasen alkoi:

— Voi sitä vasikkaa, se se vasta oli vasikka! Kun se imi lehmää ja


lehmä tokasi sitä otsallaan, niin se iloissaan hyppäsi kattoon asti.

— Kirjuri sanoi…

— Viis minä kirjurista! keskeytti Rzepa vihaisesti. — Se on minulle


ihan yhtäkaikki, sanoiko kirjuri vaiko Mikko vaiko Matti!
— Kunhan ei hän ryhtyisi kostoon! Soh, lasit pohjaan, pojat!

Taas he ryyppäsivät. Rzepan mieli lauhtui ja tyynenä istuutui hän


penkille. Äkkiä avautui ovi ja aukkoon ilmestyi — vihriä lakki, pysty
nokka ja kirjurin pikkuinen pukinparta.

Rzepa oli istunut lakki takaraivolla. Nyt hän kiireesti vetäisi sen
päästään, pudotti maahan, nousi ja änkötti:

— Ylistetty…

— Onko herrastuomari täällä? kysyi kirjuri.

— On! vastasi kolme ääntä yhtaikaa.

Kirjuri astui likemmä ja samassa kapakoitsija Szmulkin[10] lennätti


pöydälle aarakkilasin. Zolzikiewicz haisteli sitä, rypisteli nenäänsä ja
istuutui pöydän ääreen.

Hetkisen ajan vallitsi täydellinen hiljaisuus. Vihdoin alkoi Gomula:

— Herra kirjuri…

— Mitä?

— Onko se metsäasia tosiaan sillä kannalla?

— On. Kunhan vaan kaikki kuntalaiset allekirjoitatte anomuksen.

— Minä vaan en allekirjoita, tokasi siihen paikalla Rzepa, joka


kuten muutkin talonpojat kauhulla ajatteli kaikkea allekirjoittamista.

— Ei sinua kukaan pyydäkään. Tee miten tahdot. Ole vaan


kirjoittamatta, mutta älä myöskään odota metsäosuutta.
Rzepa rupesi raappimaan korvallistaan. Mutta kirjuri kääntyi
herrastuomarin ja lautamiehen puoleen ja puhui virallisella äänellä:

— Metsäasia on tosi, mutta jokaisen täytyy aidata osansa, jottei


syntyisi riitoja.

— Ja sitte se aita kanssa maksaa enemmän kuin koko metsä,


ehätti Rzepa sanomaan.

Kirjuri ei kiinnittänyt mitään huomiota hänen sanoihinsa.

— Aitaamiskustannusten peittämiseksi, puhui hän herrastuomarille


ja lautamiehelle, — on hallitus lähettänyt rahoja. Jokainen voi niistä
vielä voittaakin, sillä niistä jää viisikymmentä ruplaa miestä päälle.

Rzepan silmät säkenöivät kuten ainakin juopuneen.

— Mutta sitte minä kirjoitankin. Missä rahat ovat?

— Minulla ovat, sanoi kirjuri. — Ja tässä on paperi.

Tämän sanottuaan veti hän taskustaan esiin paperin, joka oli


taitettu nelikulmaiseksi ja luki siitä jotakin, jota talonpojat eivät
laisinkaan ymmärtäneet. He iloitsivat kuitenkin suuresti. Jos Rzepa
olisi ollut selvänä, niin hän kyllä olisi huomannut, että herrastuomari
iski silmää lautamiehelle.

Voi ihmettä! nyt kirjuri todella veti esiin rahaa taskustaan.

— No, virkkoi hän, — kuka ensiksi kirjoittaa?

Miehet kirjoittivat vuoronperään, mutta kun Rzepa tarttui kynään,


niin
Zolzikiewicz siirsi paperia syrjään ja sanoi:
— Ehket sinä tahdo. Tämä on ihan vapaaehtoista.

— Miksen minä tahtoisi?

— Szmul! huusi kirjuri.

Szmul tuli ovelle.

— Mitä herra kirjuri tahtoo?

— Ole sinäkin nyt tässä vieraanamiehenä, että tämä kaikki


tapahtui vapaasta tahdosta.

— Ehket sinä sentään tahdo? kysyi hän vielä uudestaan Rzepalta.

Mutta Rzepa oli jo kirjoittanut, vieläpä pudottanut paperille aika


mustepilkun. Hän otti kirjurilta rahat, kokonaista viisikymmentä
ruplaa ja pistettyään ne povelleen, huusi:

— Tuo nyt tänne aarakkiasi!

Szmul toi ja miehet joivat. Sitte Rzepa päästi kyynärpäänsä


nojaamaan polvia vastaan ja torkkui siihen.

Pari kertaa hän nyökäytti sinne tänne, keikahti sitte alas penkiltä,
sopersi mennessään: "Jumala, ole minulle syntiselle armollinen!" ja
nukkui.

Rzepowa ei tullut häntä noutamaan. Hän tiesi, että Rzepa


juovuspäissään pian antoi korville. Seuraavana päivänä Rzepa
sensijaan pyysi vaimoltaan anteeksi ja suuteli hänen käsiään.
Selvänä ollessaan ei hän koskaan sanonut vaimolleen pahaa sanaa,
mutta juovuspäissään oli aika pahankurinen.
Rzepa makasi kapakassa koko yön. Aamulla, auringon noustessa
hän heräsi. Hän katselee ympärilleen, levittää silmänsä ja huomaa,
ettei hän olekaan omassa mökissään vaan kapakassa, eikä edes
kulmakamarissa missä eilen istuttiin, vaan suuressa kapakkatuvassa,
missä viinatynnörikin on.

— Nimeen Isän ja Pojan ja Pyhän Hengen.

Hän katselee vielä tarkemmin. Aurinko on jo noussut ja paistaa


maalattujen ruutujen läpi viinatynnöriin. Ikkunan ääressä seisoo
Szmul, rukouspaita yllään ja hetaleita päässä; siinä hän huojuttaa
ruumistaan edestakaisin ja rukoilee ääneensä.

— Szmul, sinä koiranuskolainen! huusi Rzepa.

Mutta Szmul ei ollut kuulevinaankaan. Hänen ruumiinsa huojahti


milloin eteenpäin, milloin sivullepäin ja rukousta yhä jatkui.

Rzepa rupesi nyt koettelemaan paikkojaan, kuten talonpoika aina


tekee, nukuttuaan yön kapakassa. Hän tapasi povestaan rahaa.

— Jeesus Maria! mitä tämä merkitsee?

Sillaikaa oli Szmul lopettanut rukouksensa, riisunut rukouspaidan


ja hetaleet ja vienyt ne kulmakamariin. Hän palasi tupaan hitain
askelin, tyynenä ja arvokkaana.

— Szmul!

— No, mitä tahdot?

— Mitä rahoja nämät ovat?


— Etkö, tyhmyri, sitä tiedä? Sinähän eilen sovit herrastuomarin
kanssa, että nostat arpaa hänen poikansa sijasta ja otit jo rahat ja
allekirjoitit kontrahdin.

Nuori talonpoika kävi valkeaksi kuin vaate, viskasi lakkinsa


maahan, kaatui pitkäkseen sen päälle ja itkeä jollotti niin että
ikkunaruudut tärisivät.

— No, korjaa siitä nyt luusi, sotamies! sanoi Szmul tyynesti.

Puoli tuntia myöhemmin likeni Rzepa mökkiään. Hänen vaimonsa


oli paraikaa valmistamassa ruokaa ja kun hän kuuli portin
narahtavan, karkasi hän suoraan lieden äärestä miestään vastaan,
vihan vimmassa.

— Sinä juopporenttu! alkoi hän.

Mutta nähtyään miehensä, kavahti hän, sillä Rzepa oli muuttunut


melkein tuntemattomaksi.

— Mikä sinun on?

Rzepa astui tupaan mutta ei aluksi saanut sanaa suustaan. Hän


vaan istui penkillä ja tuijotti maahan. Mutta vaimo rupesi urkkimaan
ja sai vihdoin viimein urkituksi koko asian.

— He ovat pettäneet minut! huusi Rzepa.

Vaimo vaikeroi ääneensä ja mies hänen kanssaan; lapsikin rupesi


kätkyessään parkumaan ja Musti ulvoi ovella niin surkeasti, että
naapurinakat karkasivat ulos, kauhat kädessä, kuuntelemaan ja
kyselemään toisiltaan:
— Mitä siellä Rzepan mökissä on tapahtunut?

— Eiköhän mies mahtane kurittaa vaimoaan.

Rzepowa älmensi vielä pahemmin kuin hänen miehensä, sillä


rakastihan hän, vaimo raukka, miestään enemmän kuin mitään maan
päällä.
V.

Pässinpään lakiasäätävä eduskunta ja sen johtavat miehet.

Seuraavana päivänä oli kylässä käräjät. Koko pitäjän lautamiehet


olivat saapuneet paikalle, paitsi herrat aatelismiehet, joista
muutamat olivat lautamiehinä piirikunnassa. Koska he eivät
tahtoneet erota suuresta yleisöstä, noudattivat he englantilaista, s.o.
sekaantumattomuuden politiikkaa, jota kuuluisa valtiomies John
Bright niin suuresti oli ylistänyt. N.s. "sivistynyt" luokka ei siltä ollut
vaikuttamatta kunnan kohtaloihin. Jos jollakin "sivistyneistä" sattui
olemaan asiaa käräjiin, niin hän istunnon edellisenä päivänä kutsui
luokseen herra Zolzikiewiczin; sivistyksen edustaja tarjosi hänelle nyt
viinaa ja sikareja ja asia pohdittiin pohjia myöten. Päivällisaikaan
kehoitettiin herra Zolzikiewicziä ystävällisesti jäämään päivälliselle.
"Istukaa toki syömään, herra Zolzikiewicz, istukaa!" sanottiin hänelle.

Ja herra Zolzikiewicz istuutui, mutta seuraavana päivänä kertoi hän


ikäänkuin sivumennen herrastuomarille: "olin eilen päivällisillä
Miedzizsewskillä, Skorabiewskillä tai Oscierzynskillä. Kyllähän minä
ymmärrän yskän: talossa on tytär…!" Päivällispöydässä herra
Zolzikiewicz koetti käyttäytyä niin hienosti kuin suinkin, hän koetti
syödä mitä eriskummallisimpia ruokalajeja samalla tavalla kuin näki
muiden niitä syövän, eikä hänen käytöksestään pitänyt kenenkään
huomata, että tutunomainen kohtelu herrasväen puolelta oli hänelle
hyvin mieluinen.

Hän oli mies joka tiesi hienon maailman tavat ja joka ei koskaan
joutunut hämilleen. Hän ei milloinkaan kadottanut mielenmalttiaan,
vaan sekaantui rohkeasti keskusteluun, muistellen joko "tuota kelpo
komisariusta" tai "tuota erinomaista tirehtööriä", jonka kanssa hän
"eilen tai tässä tuonnoin" pelasi yhden kopeekan tikkiä. Sanalla
sanoen: Zolzikiewicz koetti kaikin voimin näyttää, että hän ja
Aasinkorvan piirikunnan johtavat miehet ovat likeisissä väleissä
keskenään. Tosin hän huomasi, että herrasväet hänen kertoessaan
vähän oudosti painuivat katselemaan lautasiaan, mutta hän ajatteli
että tapa sen vaatii. Monasti häntä myöskin oli hämmästyttänyt se,
ettei aatelinen isäntä, päivällisen päätyttyä, odottanut hänen
hyvästijättöään, vaan itse tuli taputtamaan häntä olalle ja
sanomaan: "no, jääkää hyvästi nyt, herra Zolzikiewicz!" mutta hän
arveli taaskin että tapa hienossa seurassa sen vaati. Kun hän sitte
hyvästi sanoessaan painoi talon herran kättä, tapasi hän aina siitä
jotakin kilisevää. Paikalla hän pusersi kokoon sormensa ja raapaisten
aatelisherran kämmentä, koppasi siitä kilisevän kappaleen. Mutta
samalla ei hän koskaan unohtanut lisätä: "voi, hyvä herra, ei sitä nyt
olisi ensinkään tarvittu!… Tuohon käräjäjuttuun nähden taas ei
herran ensinkään tarvitse huolehtia."

Näin erinomaisella johdolla ja katsoen herra Zolzikiewiczin


synnynnäisiin lahjoihin, olisivat kunnan asiat varmaan käyneet
erinomaisessa järjestyksessä, jos herra Zolzikiewicz vaan aina olisi
esiintynyt ja selittänyt tuomioistuimelle, miten asianomaista juttua
on käsiteltävä oikeuden kannalta. Mutta hän korotti äänensä
kuuluville vaan muutamissa erityisissä tapauksissa: sellaiset jutut
joita ei edeltäkäsin oltu valmistettu kilisevillä kolikoilla, jätti hän
tuomioistuimen omaan harkintaan ja istui, niitä käsiteltäessä,
levollisena paikallaan, suureksi levottomuudeksi lautamiehille, jotka
silloin tunsivat olevansa aivan päättömät.

Aatelisista eli tarkemmin sanoen herroista, otti ainoastaan muuan


herra Floss, Pikkuedistyksen kartanon pehtori, lautamiehenä osaa
kunnan asioihin. Mutta siitä sai hän osakseen yleistä paheksumista.
Aatelisto huomautti, että hän tietysti on "punainen", kuten
saksalainen nimi Floss'kin jo osoittaa, ja talonpojat, arvaten oman
erityisen talonpoikaisen asemansa, väittivät itsepintaisesti, ettei
herran sovi istua samalla penkillä talonpojan kanssa: johan sen
parhaiten todistaa sekin, etteivät "toiset herrat sitä tee." Yleensä
talonpojat moittivat herra Flossia siitä, ettei hän ollut "oikea herra" ja
ettei herra Zolzikiewiczkään pitänyt hänestä, koskei herra Floss
koskaan kilisevillä kolikoilla ollut pyrkinyt hänen suosioonsa. Kerran
hän lautamiehenä istunnossa oli käskenyt herra Zolzikiewicziä
vaikenemaan. Tyytymättömyys häneen oli siis yleinen ja eräänä
kauniina päivänä sai hän keskellä istuntoa vieressään istuvan
lautamiehen suusta kuulla seuraavan huomautuksen: "onko herra
mikään oikea herra? Herra Oscierzynski on herra ja herra
Skorabiewski on myöskin herra, mutta te, hyvä herra ette ole herra,
vaan ammattilainen!" Tämän kuultuaan herra Floss, joka hiljan oli
ostanut itselleen maatilan, antoi kunnan asioille palttua, kuten hän
aikoinaan oli kääntänyt selkänsä kaupungillekin. "Hän on pelannut
itsensä pussiin", sanoivat aateliset ja sekaantumattomuuden
politiikkaa tukeakseen mainitsivat he sananlaskun, jonka — kuten
kaikkien sananlaskujen — tuli sisältää kansan syvää viisautta ja tässä
tilaisuudessa todistaa, että talonpoika on talonpoika — häntä ei
mikään paranna.
Rauhassa sivistyneitten neuvoilta ja ilman heidän valistunutta
apuaan, keskusteli kunta siis nyt asioistaan, turvautuen ainoastaan
pässinpääläiseen älyynsä. Olisihan sen tosin pitänyt Pässinpäälle
riittää, ainakin sen väitteen mukaan että parisilainen äly riittää
Parisille. Onhan sitäpaitsi tunnustettu asia, että käytännöllinen
ymmärrys eli niinkutsuttu "terve talonpoikainen järki" merkitsee
enemmän kuin epäkansallinen, ulkoapäin tullut sivistys. "Terveen
järjen" ovat maan omat asukkaat jo syntyessään tuoneet maailmaan
— sitäkään ei, ymmärtääkseni, kukaan väitä valheeksi..

Kaikki tämä tuli ilmi Pässinpään käräjissä. Siellä luettiin esitys,


jossa viranomaiset anovat, että kunta omalla kustannuksellaan
korjauttaisi maantien, joka Pässinpään maiden halki vie
Aasinkorvaan. Esitys ei ensinkään miellyttänyt kokoontuneita kunnan
isiä ja eräs paikkakunnan senaattoreista ilmilausui selvästi, ettei tie
ensinkään ole korjauksen tarpeessa, sillä voidaan ajaa herra
Skorabiewskin niityn poikki. Jos herra Skorabiewski olisi ollut läsnä
istunnossa, niin hän ehkä olisi huomannut olevan syytä vastustaa
tätä yleishyvää tarkoittavaa huomautusta, mutta hän ei ollut läsnä,
sillä hän suosi sekaantumattomuuden politiikkaa. Kyllä senaattorin
esitys varmaan olisi saavuttanut yksimielistä kannatusta, jollei herra
Zolzikiewicz edellisenä päivänä olisi ollut päivällisillä herra
Skorabiewskin luona. Hän oli silloin kertonut neiti Jadwigalle kahden
espanjalaisen kenraalin kuristamisesta Madridissa, jonka kohtauksen
hän oli lukenut herra Breslauerin kustantamasta "Isabella
Espanjalaisesta." Päivällisen jälkeen painaessaan herra
Skorabiewskin kättä, oli hänen käteensä sattunut kilisevä kolikka.
Herra kirjuri ei ollut huolinut panna vastaustaan paperille, vaan laski
nyt kynän kädestään, josta kaikki paikalla ymmärsivät, että hän
haluaa puheenvuoroa.
— Herra kirjuri tahtoo sanoa jotakin, kajahti useista suista
yhtaikaa.

— Minä tahdon vaan sanoa, että olette aika tyhmyrejä, virkkoi


herra kirjuri tyynesti.

Tämän todella valtioviisaan puheen voima, tässä sen


supistuneessakin muodossa, oli sangen suuri. Lausutut sanat
sisälsivät vastalauseen sekä lautamiehen huomautusta että yleensä
Pässinpään koko lainsäätävää hallintoa vastaan. Mainitun hallinnon
jäsenet rupesivatkin nyt levottomina katselemaan toisiinsa ja
raappimaan ajatuskyvyn jaloa jäsentä, päätä. Se osoitti, että
Pässinpään hallinnon jäsenet olivat painuneet punnitsemaan asiaa
pohjia myöten. Pitkän vaitiolon jälkeen muuan edustajista vihdoin
aukaisi suunsa ja kysyi:

— Mutta minkätähden?

— Siksi että olette tyhmyrejä!

— Ehkä! virkkoi muuan ääni.

— Niitty on aina niitty, huomautti toinen.

— Keväällä ei siitä pääse edes kulkemaankaan, jatkoi kolmas.

Tämän johdosta hylättiin herra Skorabiewskin niittyä koskeva


esitys, hallituksen ehdotus hyväksyttiin ja myötäseuranneen
kustannusarvion mukaan ryhdyttiin keskustelemaan siitä, miten
korjauskustannukset olisivat jaettavat kuntalaisten kesken.
Oikeudentunto oli jo siihen määrään juurtunut Pässinpään
lainsäätävän hallinnon katsantokantaan, ettei kenenkään muun kuin
herrastuomarin ja lautamies Gomulan päähän pälkähtänyt koettaa
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookball.com

You might also like