100% found this document useful (9 votes)
60 views

(Ebook) Deep Learning with JavaScript: Neural networks in TensorFlow.js by Shanqing Cai; Stanley Bileschi; Eric D. Nielsen ISBN 9781617296178, 1617296171 download pdf

The document provides information about the ebook 'Deep Learning with JavaScript: Neural Networks in TensorFlow.js' by Shanqing Cai, Stanley Bileschi, and Eric D. Nielsen, including its ISBN and a link for download. It also mentions other related ebooks available on the same platform, covering various topics in deep learning and machine learning. The content includes a detailed table of contents outlining chapters on basic concepts, TensorFlow.js, advanced deep learning techniques, and practical applications.

Uploaded by

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

(Ebook) Deep Learning with JavaScript: Neural networks in TensorFlow.js by Shanqing Cai; Stanley Bileschi; Eric D. Nielsen ISBN 9781617296178, 1617296171 download pdf

The document provides information about the ebook 'Deep Learning with JavaScript: Neural Networks in TensorFlow.js' by Shanqing Cai, Stanley Bileschi, and Eric D. Nielsen, including its ISBN and a link for download. It also mentions other related ebooks available on the same platform, covering various topics in deep learning and machine learning. The content includes a detailed table of contents outlining chapters on basic concepts, TensorFlow.js, advanced deep learning techniques, and practical applications.

Uploaded by

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

Download Full Version ebook - Visit ebooknice.

com

(Ebook) Deep Learning with JavaScript: Neural


networks in TensorFlow.js by Shanqing Cai; Stanley
Bileschi; Eric D. Nielsen ISBN 9781617296178,
1617296171
https://ebooknice.com/product/deep-learning-with-javascript-
neural-networks-in-tensorflow-js-27166480

Click the button below to download

DOWLOAD EBOOK

Discover More Ebook - Explore Now at ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Deep Learning with JavaScript: Neural networks in


TensorFlow.js by Shanqing Cai, Stan Bileschi, Eric Nielsen
ISBN 9781617296178, 1617296171
https://ebooknice.com/product/deep-learning-with-javascript-neural-
networks-in-tensorflow-js-10792450

ebooknice.com

(Ebook) Piano adventures Performance 3b by Nancy and


Randall Faber

https://ebooknice.com/product/piano-adventures-performance-3b-52393612

ebooknice.com

(Ebook) Deep Learning with Keras: Implementing Deep


Learning Models and Neural Networks with the power of
Python by Antonio Gulli, Sujit Pal ISBN 9781787128422,
1787128423
https://ebooknice.com/product/deep-learning-with-keras-implementing-
deep-learning-models-and-neural-networks-with-the-power-of-
python-7360028
ebooknice.com

(Ebook) MATLAB Deep Learning: With Machine Learning,


Neural Networks and Artificial Intelligence by Phil Kim
ISBN 9781484228449, 9781484228456, 1484228448, 1484228456
https://ebooknice.com/product/matlab-deep-learning-with-machine-
learning-neural-networks-and-artificial-intelligence-5880894

ebooknice.com
(Ebook) Learning TensorFlow.js: Powerful Machine Learning
in JavaScript by Gant Laborde ISBN 9781492090793,
1492090794
https://ebooknice.com/product/learning-tensorflow-js-powerful-machine-
learning-in-javascript-50785622

ebooknice.com

(Ebook) Learning TensorFlow.js: Powerful Machine Learning


in JavaScript by Gant Laborde ISBN 9781492090793,
1492090794
https://ebooknice.com/product/learning-tensorflow-js-powerful-machine-
learning-in-javascript-34021250

ebooknice.com

(Ebook) Deep Learning with TensorFlow: Explore neural


networks with Python by Zaccone, Giancarlo, Karim, Md.
Rezaul, Menshawy, Ahmed ISBN 9781786469786, 1786469782
https://ebooknice.com/product/deep-learning-with-tensorflow-explore-
neural-networks-with-python-33448226

ebooknice.com

(Ebook) Deep Learning with TensorFlow: Explore neural


networks with Python by Zaccone, Giancarlo, Karim, Md.
Rezaul, Menshawy, Ahmed ISBN 9781786469786, 1786469782
https://ebooknice.com/product/deep-learning-with-tensorflow-explore-
neural-networks-with-python-33492874

ebooknice.com

(Ebook) Learn Keras for Deep Neural Networks: A Fast-Track


Approach to Modern Deep Learning with Python by Jojo John
Moolayil ISBN 9781484242391, 1484242394
https://ebooknice.com/product/learn-keras-for-deep-neural-networks-a-
fast-track-approach-to-modern-deep-learning-with-python-7280140

ebooknice.com
Deep Learning with JavaScript:
Neural networks in TensorFlow.js
Shanqing Cai, Stanley Bileschi, Eric D. Nielsen with Francois
Chollet
Copyright
For online information and ordering of this and other Manning books,
please visit www.manning.com. The publisher offers discounts on this book
when ordered in quantity.

For more information, please contact

Special Sales Department

Manning Publications Co.

20 Baldwin Road

PO Box 761

Shelter Island, NY 11964

Email: [email protected]

© 2020 by Manning Publications Co. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system,


or transmitted, in any form or by means electronic, mechanical,
photocopying, or otherwise, without prior written permission of the
publisher.

Many of the designations used by manufacturers and sellers to distinguish


their products are claimed as trademarks. Where those designations appear
in the book, and Manning Publications was aware of a trademark claim, the
designations have been printed in initial caps or all caps.

Recognizing the importance of preserving what has been written, it is


Manning’s policy to have the books we publish printed on acid-free paper,
and we exert our best efforts to that end. Recognizing also our
responsibility to conserve the resources of our planet, Manning books are
printed on paper that is at least 15 percent recycled and processed without
the use of elemental chlorine.

Manning Publications Co.

20 Baldwin Road

PO Box 761

Shelter Island, NY 11964


Development editor: Jenny Stout

Technical development editor: Marc-Phillipe Huget

Review editor: Ivan Martinovič

Project editor: Lori Weidert

Copy editor: Rebecca Deuel-Gallegos

Proofreader: Jason Everett

Technical proofreader: Karsten Strøbæck

Typesetter: Dottie Marsico

Cover designer: Marija Tudor

ISBN 9781617296178

Printed in the United States of America


Brief Table of Contents
Copyright
Brief Table of Contents
Table of Contents
Foreword
Preface
Acknowledgments
About this Book
About the Authors
About the cover illustration

1. Motivation and basic concepts


Chapter 1. Deep learning and JavaScript

2. A gentle introduction to TensorFlow.js


Chapter 2. Getting started: Simple linear regression in TensorFlow.js
Chapter 3. Adding nonlinearity: Beyond weighted sums
Chapter 4. Recognizing images and sounds using convnets
Chapter 5. Transfer learning: Reusing pretrained neural networks

3. Advanced deep learning with TensorFlow.js


Chapter 6. Working with data
Chapter 7. Visualizing data and models
Chapter 8. Underfitting, overfitting, and the universal workflow of
machine learning
Chapter 9. Deep learning for sequences and text
Chapter 10. Generative deep learning
Chapter 11. Basics of deep reinforcement learning

4. Summary and closing words


Chapter 12. Testing, optimizing, and deploying models
Chapter 13. Summary, conclusions, and beyond

A. Installing tfjs-node-gpu and its dependencies


B. A quick tutorial of tensors and operations in TensorFlow.js
Glossary

Index

List of Figures

List of Tables

List of Listings
Table of Contents
Copyright
Brief Table of Contents
Table of Contents
Foreword
Preface
Acknowledgments
About this Book
About the Authors
About the cover illustration

1. Motivation and basic concepts


Chapter 1. Deep learning and JavaScript
1.1. Artificial intelligence, machine learning, neural networks, and deep
learning
1.1.1. Artificial intelligence
1.1.2. Machine learning: How it differs from traditional programming
1.1.3. Neural networks and deep learning
1.1.4. Why deep learning? Why now?

1.2. Why combine JavaScript and machine learning?


1.2.1. Deep learning with Node.js
1.2.2. The JavaScript ecosystem

1.3. Why TensorFlow.js?


1.3.1. A brief history of TensorFlow, Keras, and TensorFlow.js
1.3.2. Why TensorFlow.js: A brief comparison with similar libraries
1.3.3. How is TensorFlow.js being used by the world?
1.3.4. What this book will and will not teach you about TensorFlow.js

Exercises
Summary

2. A gentle introduction to TensorFlow.js


Chapter 2. Getting started: Simple linear regression in TensorFlow.js
2.1. Example 1: Predicting the duration of a download using
TensorFlow.js
2.1.1. Project overview: Duration prediction
2.1.2. A note on code listings and console interactions
2.1.3. Creating and formatting the data
2.1.4. Defining a simple model
2.1.5. Fitting the model to the training data
2.1.6. Using our trained model to make predictions
2.1.7. Summary of our first example

2.2. Inside Model.fit(): Dissecting gradient descent from example 1


2.2.1. The intuitions behind gradient-descent optimization
2.2.2. Backpropagation: Inside gradient descent

2.3. Linear regression with multiple input features


2.3.1. The Boston Housing Prices dataset
2.3.2. Getting and running the Boston-housing project from GitHub
2.3.3. Accessing the Boston-housing data
2.3.4. Precisely defining the Boston-housing problem
2.3.5. A slight diversion into data normalization
2.3.6. Linear regression on the Boston-housing data

2.4. How to interpret your model


2.4.1. Extracting meaning from learned weights
2.4.2. Extracting internal weights from the model
2.4.3. Caveats on interpretability

Exercises
Summary

Chapter 3. Adding nonlinearity: Beyond weighted sums


3.1. Nonlinearity: What it is and what it is good for
3.1.1. Building the intuition for nonlinearity in neural networks
3.1.2. Hyperparameters and hyperparameter optimization
3.2. Nonlinearity at output: Models for classification
3.2.1. What is binary classification?
3.2.2. Measuring the quality of binary classifiers: Precision, recall,
accuracy, and ROC curves
3.2.3. The ROC curve: Showing trade-offs in binary classification
3.2.4. Binary cross entropy: The loss function for binary classification

3.3. Multiclass classification


3.3.1. One-hot encoding of categorical data
3.3.2. Softmax activation
3.3.3. Categorical cross entropy: The loss function for multiclass
classification
3.3.4. Confusion matrix: Fine-grained analysis of multiclass
classification

Exercises
Summary

Chapter 4. Recognizing images and sounds using convnets


4.1. From vectors to tensors: Representing images
4.1.1. The MNIST dataset

4.2. Your first convnet


4.2.1. conv2d layer
4.2.2. maxPooling2d layer
4.2.3. Repeating motifs of convolution and pooling
4.2.4. Flatten and dense layers
4.2.5. Training the convnet
4.2.6. Using a convnet to make predictions

4.3. Beyond browsers: Training models faster using Node.js


4.3.1. Dependencies and imports for using tfjs-node
4.3.2. Saving the model from Node.js and loading it in the browser

4.4. Spoken-word recognition: Applying convnets on audio data


4.4.1. Spectrograms: Representing sounds as images
Exercises
Summary

Chapter 5. Transfer learning: Reusing pretrained neural networks


5.1. Introduction to transfer learning: Reusing pretrained models
5.1.1. Transfer learning based on compatible output shapes: Freezing
layers
5.1.2. Transfer learning on incompatible output shapes: Creating a new
model using outputs from the base model
5.1.3. Getting the most out of transfer learning through fine-tuning: An
audio example

5.2. Object detection through transfer learning on a convnet


5.2.1. A simple object-detection problem based on synthesized scenes
5.2.2. Deep dive into simple object detection

Exercises
Summary

3. Advanced deep learning with TensorFlow.js


Chapter 6. Working with data
6.1. Using tf.data to manage data
6.1.1. The tf.data.Dataset object
6.1.2. Creating a tf.data.Dataset
6.1.3. Accessing the data in your dataset
6.1.4. Manipulating tfjs-data datasets

6.2. Training models with model.fitDataset


6.3. Common patterns for accessing data
6.3.1. Working with CSV format data
6.3.2. Accessing video data using tf.data.webcam()
6.3.3. Accessing audio data using tf.data.microphone()

6.4. Your data is likely flawed: Dealing with problems in your data
6.4.1. Theory of data
6.4.2. Detecting and cleaning problems with data

6.5. Data augmentation


Exercises
Summary

Chapter 7. Visualizing data and models


7.1. Data visualization
7.1.1. Visualizing data using tfjs-vis
7.1.2. An integrative case study: Visualizing weather data with tfjs-vis

7.2. Visualizing models after training


7.2.1. Visualizing the internal activations of a convnet
7.2.2. Visualizing what convolutional layers are sensitive to: Maximally
activating images
7.2.3. Visual interpretation of a convnet’s classification result

Materials for further reading and exploration


Exercises
Summary

Chapter 8. Underfitting, overfitting, and the universal workflow of


machine learning
8.1. Formulation of the temperature-prediction problem
8.2. Underfitting, overfitting, and countermeasures
8.2.1. Underfitting
8.2.2. Overfitting
8.2.3. Reducing overfitting with weight regularization and visualizing it
working

8.3. The universal workflow of machine learning


Exercises
Summary

Chapter 9. Deep learning for sequences and text


9.1. Second attempt at weather prediction: Introducing RNNs
9.1.1. Why dense layers fail to model sequential order
9.1.2. How RNNs model sequential order

9.2. Building deep-learning models for text


9.2.1. How text is represented in machine learning: One-hot and multi-
hot encoding
9.2.2. First attempt at the sentiment-analysis problem
9.2.3. A more efficient representation of text: Word embeddings
9.2.4. 1D convnets

9.3. Sequence-to-sequence tasks with attention mechanism


9.3.1. Formulation of the sequence-to-sequence task
9.3.2. The encoder-decoder architecture and the attention mechanism
9.3.3. Deep dive into the attention-based encoder-decoder model

Materials for further reading


Exercises
Summary

Chapter 10. Generative deep learning


10.1. Generating text with LSTM
10.1.1. Next-character predictor: A simple way to generate text
10.1.2. The LSTM-text-generation example
10.1.3. Temperature: Adjustable randomness in the generated text

10.2. Variational autoencoders: Finding an efficient and structured


vector representation of images
10.2.1. Classical autoencoder and VAE: Basic ideas
10.2.2. A detailed example of VAE: The Fashion-MNIST example

10.3. Image generation with GANs


10.3.1. The basic idea behind GANs
10.3.2. The building blocks of ACGAN
10.3.3. Diving deeper into the training of ACGAN
10.3.4. Seeing the MNIST ACGAN training and generation
Materials for further reading
Exercises
Summary

Chapter 11. Basics of deep reinforcement learning


11.1. The formulation of reinforcement-learning problems
11.2. Policy networks and policy gradients: The cart-pole example
11.2.1. Cart-pole as a reinforcement-learning problem
11.2.2. Policy network
11.2.3. Training the policy network: The REINFORCE algorithm

11.3. Value networks and Q-learning: The snake game example


11.3.1. Snake as a reinforcement-learning problem
11.3.2. Markov decision process and Q-values
11.3.3. Deep Q-network
11.3.4. Training the deep Q-network

Materials for further reading


Exercises
Summary

4. Summary and closing words


Chapter 12. Testing, optimizing, and deploying models
12.1. Testing TensorFlow.js models
12.1.1. Traditional unit testing
12.1.2. Testing with golden values
12.1.3. Considerations around continuous training

12.2. Model optimization


12.2.1. Model-size optimization through post-training weight
quantization
12.2.2. Inference-speed optimization using GraphModel conversion

12.3. Deploying TensorFlow.js models on various platforms and


environments
12.3.1. Additional considerations when deploying to the web
12.3.2. Deployment to cloud serving
12.3.3. Deploying to a browser extension, like Chrome Extension
12.3.4. Deploying TensorFlow.js models in JavaScript-based mobile
applications
12.3.5. Deploying TensorFlow.js models in JavaScript-based cross-
platform desktop applications
12.3.6. Deploying TensorFlow.js models on WeChat and other
JavaScript-based mobile app plugin systems
12.3.7. Deploying TensorFlow.js models on single-board computers
12.3.8. Summary of deployments

Materials for further reading


Exercises
Summary

Chapter 13. Summary, conclusions, and beyond


13.1. Key concepts in review
13.1.1. Various approaches to AI
13.1.2. What makes deep learning stand out among the subfields of
machine learning
13.1.3. How to think about deep learning at a high level
13.1.4. Key enabling technologies of deep learning
13.1.5. Applications and opportunities unlocked by deep learning in
JavaScript

13.2. Quick overview of the deep-learning workflow and algorithms in


TensorFlow.js
13.2.1. The universal workflow of supervised deep learning
13.2.2. Reviewing model and layer types in TensorFlow.js: A quick
reference
13.2.3. Using pretrained models from TensorFlow.js
13.2.4. The space of possibilities
13.2.5. Limitations of deep learning

13.3. Trends in deep learning


13.4. Pointers for further exploration
13.4.1. Practice real-world machine-learning problems on Kaggle
13.4.2. Read about the latest developments on arXiv
13.4.3. Explore the TensorFlow.js Ecosystem

Final words

A. Installing tfjs-node-gpu and its dependencies


A.1. Installing tfjs-node-gpu on Linux
A.2. Installing tfjs-node-gpu on Windows

B. A quick tutorial of tensors and operations in TensorFlow.js


B.1. Tensor creation and tensor axis conventions
B.1.1. Scalar (rank-0 tensor)
B.1.2. tensor1d (rank-1 tensor)
B.1.3. tensor2d (rank-2 tensor)
B.1.4. Rank-3 and higher-dimensional tensors
B.1.5. The notion of data batches
B.1.6. Real-world examples of tensors
B.1.7. Creating tensors from tensor buffers
B.1.8. Creating all-zero and all-one tensors
B.1.9. Creating randomly valued tensors

B.2. Basic tensor operations


B.2.1. Unary operations
B.2.2. Binary operations
B.2.3. Concatenation and slicing of tensors

B.3. Memory management in TensorFlow.js: tf.dispose() and tf.tidy()


B.4. Calculating gradients
Exercises

Glossary
Index

List of Figures

List of Tables

List of Listings
Foreword
When we started TensorFlow.js (TF.js), formerly called deeplearn.js,
machine learning (ML) was done mostly in Python. As both JavaScript
developers and ML practitioners on the Google Brain team, we quickly
realized that there was an opportunity to bridge the two worlds. Today,
TF.js has empowered a new set of developers from the extensive JavaScript
community to build and deploy ML models and enabled new classes of on-
device computation.

TF.js would not exist in its form today without Shanqing, Stan, and Eric.
Their contributions to TensorFlow Python, including the TensorFlow
Debugger, eager execution, and build and test infrastructure, uniquely
positioned them to tie the Python and JavaScript worlds together. Early on
in the development, their team realized the need for a library on top of
deeplearn.js that would provide high-level building blocks to develop ML
models. Shanqing, Stan, and Eric, among others, built TF.js Layers, allowing
conversion of Keras models to JavaScript, which dramatically increased the
wealth of available models in the TF.js ecosystem. When TF.js Layers was
ready, we released TF.js to the world.

To investigate the motivations, hurdles, and desires of software developers,


Carrie Cai and Philip Guo deployed a survey to the TF.js website. This book
is in direct response to the study’s summary: “Our analysis found that
developers’ desires for ML frameworks extended beyond simply wanting
help with APIs: more fundamentally, they desired guidance on
understanding and applying the conceptual underpinnings of ML itself.”[1]
1

C. Cai and P. Guo, (2019) “Software Developers Learning Machine Learning: Motivations, Hurdles, and Desires,”
IEEE Symposium on Visual Languages and Human-Centric Computing, 2019.

Deep Learning with JavaScript contains a mix of deep learning theory as


well as real-world examples in JavaScript with TF.js. It is a great resource
for JavaScript developers with no ML experience or formal math
background, as well as ML practitioners who would like to extend their work
into the JavaScript ecosystem. This book follows the template of Deep
Learning with Python, one of the most popular applied-ML texts, written by
the Keras creator, François Chollet. Expanding on Chollet’s work, Deep
Learning with JavaScript does an amazing job building on the unique things
that JavaScript has to offer: interactivity, portability, and on-device
computation. It covers core ML concepts, but does not shy away from
state-of-the-art ML topics, such as text translation, generative models, and
reinforcement learning. It even gives pragmatic advice on deploying ML
models into real-world applications written by practitioners who have
extensive experience deploying ML to the real world. The examples in this
book are backed by interactive demos that demonstrate the unique
advantages of the JavaScript ecosystem. All the code is open-sourced, so
you can interact with it and fork it online.

This book should serve as the authoritative source for readers who want to
learn ML and use JavaScript as their main language. Sitting at the forefront
of ML and JavaScript, we hope you find the concepts in this book useful
and the journey in JavaScript ML a fruitful and exciting one.

—NIKHIL THORAT AND DANIEL SMILKOV,


inventors of deeplearn.js
and technical leads of TensorFlow.js
Preface
The most significant event in the recent history of technology is perhaps
the explosion in the power of neural networks since 2012. This was when
the growth in labeled datasets, increases in computation power, and
innovations in algorithms came together and reached a critical mass. Since
then, deep neural networks have made previously unachievable tasks
achievable and boosted the accuracies in other tasks, pushing them beyond
academic research and into practical applications in domains such as
speech recognition, image labeling, generative models, and
recommendation systems, just to name a few.

It was against this backdrop that our team at Google Brain started
developing TensorFlow.js. When the project started, many regarded “deep
learning in JavaScript” as a novelty, perhaps a gimmick, fun for certain use
cases, but not to be pursued with seriousness. While Python already had
several well-established and powerful frameworks for deep learning, the
JavaScript machine-learning landscape remained splintered and incomplete.
Of the handful of JavaScript libraries available back then, most only
supported deploying models pretrained in other languages (usually in
Python). For the few that supported building and training models from
scratch, the scope of supported model types was limited. Considering
JavaScript’s popular status and its ubiquity that straddles client and server
sides, this was a strange situation.

TensorFlow.js is the first full-fledged industry-quality library for doing neural


networks in JavaScript. The range of capabilities it provides spans multiple
dimensions. First, it supports a wide range of neural-networks layers,
suitable for various data types ranging from numeric to text, from audio to
images. Second, it provides APIs for loading pretrained models for
inference, fine-tuning pretrained models, and building and training models
from scratch. Third, it provides both a high-level, Keras-like API for
practitioners who opt to use well-established layer types, and a low-level,
TensorFlow-like API for those who wish to implement more novel
algorithms. Finally, it is designed to be runnable in a wide selection of
environments and hardware types, including the web browser, server side
(Node.js), mobile (e.g., React Native and WeChat), and desktop (electron).
Adding to the multidimensional capability of TensorFlow.js is its status as a
first-class integrated part of the larger TensorFlow/Keras ecosystem,
specifically its API consistency and two-way model-format compatibility with
the Python libraries.

The book you have in your hands will guide your grand tour through this
multidimensional space of capabilities. We’ve chosen a path that primarily
cuts through the first dimension (modeling tasks), enriched by excursions
along the remaining dimensions. We start from the relatively simpler task of
predicting numbers from numbers (regression) to the more complex ones
such as predicting classes from images and sequences, ending our trip on
the fascinating topics of using neural networks to generate new images and
training agents to make decisions (reinforcement learning).

We wrote the book not just as a recipe for how to write code in
TensorFlow.js, but as an introductory course in the foundations of machine
learning in the native language of JavaScript and web developers. The field
of deep learning is a fast-evolving one. It is our belief that a firm
understanding of machine learning is possible without formal mathematical
treatment, and this understanding will enable you to keep yourself up-to-
date in future evolution of the techniques.

With this book you’ve made the first step in becoming a member of the
growing community of JavaScript machine-learning practitioners, who’ve
already brought about many impactful applications at the intersection
between JavaScript and deep learning. It is our sincere hope that this book
will kindle your own creativity and ingenuity in this space.

SHANQING CAI, STAN BILESCHI, AND ERIC NIELSEN


September 2019
Cambridge, MA
Acknowledgments
This book owes Deep Learning with Python by François Chollet for its
overall structure. Despite the fact that the code was rewritten in a different
language and much new content was added for the JavaScript ecosystem
and to reflect new developments in the field, neither this book nor the
entire high-level API of TensorFlow.js would have been a reality without
pioneer work on Keras led by François.

Our journey to the completion of this book and all the related code was
made pleasant and fulfilling thanks to the incredible support from our
colleagues on Google’s TensorFlow.js Team. The seminal and foundational
work by Daniel Smilkov and Nikhil Thorat on the low-level WebGL kernels
and backpropagation forms a rock-solid foundation for model building and
training. The work by Nick Kreeger on the Node.js binding to TensorFlow’s
C library is the main reason why we can run neural networks in the browser
and Node.js with the same code. The TensorFlow.js data API by David
Soergel and Kangyi Zhang makes chapter 6 of the book possible, while
chapter 7 was enabled by the visualization work by Yannick Assogba. The
performance optimization techniques described in chapter 11 wouldn’t be
possible without Ping Yu’s work on op-level interface with TensorFlow. The
speed of our examples wouldn’t be nearly as fast as it is today without the
focused performance optimization work by Ann Yuan. The leadership of
Sarah Sirajuddin, Sandeep Gupta, and Brijesh Krishnaswami is critical to the
overall long-term success of the TensorFlow.js project.

We would have fallen off the track without the support and encouragement
of D. Sculley, who carefully reviewed all the chapters of the book. We’re
also immensely grateful for all the encouragement we received from
Fernanda Viegas, Martin Wattenberg, Hal Abelson, and many other
colleagues of ours at Google. Our writing and content were greatly
improved as a result of the detailed review by François Chollet, Nikhil
Thorat, Daniel Smilkov, Jamie Smith, Brian K. Lee, and Augustus Odena, as
well as by in-depth discussion with Suharsh Sivakumar.

One of the unique pleasures of working on a project such as TensorFlow.js


is the opportunity to work alongside and interact with the worldwide open-
source software community. TensorFlow.js was fortunate to have a group of
talented and driven contributors including Manraj Singh, Kai Sasaki, Josh
Gartman, Sasha Illarionov, David Sanders, syt123450@, and many many
others, whose tireless work on the library expanded its capability and
improved its quality. Manraj Singh also contributed the phishing-detection
example used in chapter 3 of the book.

We are grateful to our editorial team at Manning Publications. The


dedicated and tireless work by Brian Sawyer, Jennifer Stout, Rebecca
Rinehart, and Mehmed Pasic, and many others made it possible for we
authors to focus on writing the content. Marc-Philip Huget provided
extensive and incisive technical review throughout the development
process. Special thanks go to our reviewers, Alain Lompo, Andreas
Refsgaard, Buu Nguyen, David DiMaria, Edin Kapic, Edwin Kwok, Eoghan
O’Donnell, Evan Wallace, George thomas, Giuliano Bertoti, Jason Hales,
Marcio Nicolau, Michael Wall, Paulo Nuin, Pietro Maffi, Polina Keselman,
Prabhuti Prakash, Ryan Burrows, Satej Sahu, Suresh Rangarajulu, Ursin
Stauss, and Vaijanath Rao, whose suggestions helped make this a better
book.

We thank our MEAP readers for catching and pointing out quite a few
typographical and technical errors.

Finally, none of this would be possible without the tremendous


understanding and sacrifice on the part of our families. Shanqing Cai would
like to express the deepest gratitude to his wife, Wei, as well as his parents
and parents-in-law for their help and support during this book’s year-long
writing process. Stan Bileschi would like to thank his mother and father, as
well as his step-mother and step-father, for providing a foundation and
direction to build a successful career in science and engineering. He would
also like to thank his wife, Constance, for her love and support. Eric Nielsen
would like to say to his friends and family, thank you.
About this Book
Who should read this book
This book is written for programmers who have a working knowledge of
JavaScript, from prior experience with either web frontend development or
Node.js-based backend development, and wish to venture into the world of
deep learning. It aims to satisfy the learning needs of the following two
subgroups of readers:

JavaScript programmers who aspire to go from little-to-no experience


with machine learning or its mathematical background, to a decent
knowledge of how deep learning works and a practical understanding
of the deep-learning workflow that is sufficient for solving common
data-science problems such as classification and regression
Web or Node.js developers who are tasked with deploying pre-trained
models in their web app or backend stack as new features

For the first group of readers, this book develops the basic concepts of
machine learning and deep learning in a ground-up fashion, using
JavaScript code examples that are fun and ready for fiddling and hacking.
We use diagrams, pseudo-code, and concrete examples in lieu of formal
mathematics to help you form an intuitive, yet firm, grasp of the
foundations of how deep learning works.

For the second group of readers, we cover the key steps of converting
existing models (e.g., from Python training libraries) into a web- and/or
Node-compatible format suitable for deployment in the frontend or the
Node stack. We emphasize practical aspects such as optimizing model size
and performance, as well as considerations for various deployment
environments ranging from a server to browser extensions and mobile
apps.

This book provides in-depth coverage of the TensorFlow.js API for ingesting
and formatting data, for building and loading models, and for running
inference, evaluation, and training for all readers.
Finally, technically minded people who don’t code regularly in JavaScript or
any other language will also find this book useful as an introductory text for
both basic and advanced neural networks.

How this book is organized: A roadmap


This book is organized into four parts. The first part, consisting of chapter 1
only, introduces you to the landscape of artificial intelligence, machine
learning, and deep learning, and why it makes sense to practice deep
learning in JavaScript.

The second part forms a gentle introduction to the most foundational and
frequently encountered concepts in deep learning. In particular:

Chapters 2 and 3 are your gentle on-ramp to machine learning.


Chapter 2 works through a simple problem of predicting a single
number from another number by fitting a straight line (linear
regression) and uses it to illustrate how backpropagation (the engine
of deep learning) works. Chapter 3 builds on chapter 2 by introducing
nonlinearity, multi-layered networks, and classification tasks. From this
chapter you will gain an understanding of what nonlinearity is, how it
works, and why it gives deep neural networks their expressive power.
Chapter 4 deals with image data and the neural-network architecture
dedicated to solving image-related machine-learning problems:
convolutional networks (convnets). We will also show you why
convolution is a generic method that has uses beyond images by using
audio inputs as an example.
Chapter 5 continues the focus on convnets and image-like inputs, but
shifts into the topic of transfer learning: how to train new models
based on existing ones, instead of starting from scratch.

Part 3 of the book systematically covers more advanced topics in deep


learning for users who wish to build an understanding of more cutting-edge
techniques, with a focus on specific challenging areas of ML systems, and
the TensorFlow.js tools to work with them:

Chapter 6 discusses techniques for dealing with data in the context of


deep learning.
Chapter 7 shows the techniques for visualizing data and the models
that process them, an important and indispensable step for any deep-
learning workflow.
Chapter 8 focuses on the important topics of underfitting and
overfitting in deep learning, and techniques for analyzing and
mitigating them. Through this discussion, we condense what we’ve
learned in this book so far into a recipe referred to as “the universal
workflow of machine learning.” This chapter prepares you for the
advanced neural-network architectures and problems in chapters 9–11.
Chapter 9 is dedicated to deep neural networks that process sequential
data and text inputs.
Chapters 10 and 11 cover the advanced deep-learning areas of
generative models (including generative adversarial networks) and
reinforcement learning, respectively.

In the fourth and final part of the book, we cover techniques for testing,
optimizing and deploying models trained or converted with TensorFlow.js
(chapter 12) and wrap up the whole book by recapitulating the most
important concepts and workflows (chapter 13).

Each chapter finishes with exercises to help you gauge your level of
understanding and hone your deep-learning skills in TensorFlow.js in a
hands-on fashion.

About the code


This book contains many examples of source code both in numbered
listings and in line with normal text. In both cases, source code is formatted
in a fixed-width font like this to separate it from ordinary text.
Sometimes code is also in bold to highlight code that has changed from
previous steps in the chapter, such as when a new feature adds to an
existing line of code.

In many cases, the original source code has been reformatted; we’ve added
line breaks and reworked indentation to accommodate the available page
space in the book. In rare cases, even this was not enough, and listings
include line-continuation markers ( ). Additionally, comments in the source
code have often been removed from the listings when the code is described
in the text. Code annotations accompany many of the listings, highlighting
important concepts. The code for the examples in this book is available for
download from GitHub at https://github.com/tensorflow/tfjs-examples.

liveBook discussion forum


Purchase of Deep Learning with JavaScript includes free access to a private
web forum run by Manning Publications where you can make comments
about the book, ask technical questions, and receive help from the author
and from other users. To access the forum, go to
https://livebook.manning.com/#!/book/deep-learning-with-
javascript/discussion. You can also learn more about Manning’s forums and
the rules of conduct at https://livebook.manning.com/#!/discussion.

Manning’s commitment to our readers is to provide a venue where a


meaningful dialogue between individual readers and between readers and
the author can take place. It is not a commitment to any specific amount of
participation on the part of the author, whose contribution to the forum
remains voluntary (and unpaid). We suggest you try asking the authors
some challenging questions lest their interest stray! The forum and the
archives of previous discussions will be accessible from the publisher’s
website as long as the book is in print.
About the Authors
SHANQING CAI, STANLEY BILESCHI, AND ERIC NIELSEN are software engineers on the
Google Brain team. They were the primary developers of the high-level API
of TensorFlow.js, including the examples, the documentation, and the
related tooling. They have applied TensorFlow.js-based deep learning to
real-world problems such as alternative communication for people with
disabilities. They each have advanced degrees from MIT.
About the cover illustration
The figure on the cover of Deep Learning with JavaScript is captioned
“Finne Katschin,” or a girl from the Katschin tribe. The illustration is taken
from a collection of dress costumes from various countries by Jacques
Grasset de Saint-Sauveur (1757-1810), titled Costumes de Différents Pays,
published in France in 1797. Each illustration is finely drawn and colored by
hand. The rich variety of Grasset de Saint-Sauveur’s collection reminds us
vividly of how culturally apart the world’s towns and regions were just 200
years ago. Isolated from each other, people spoke different dialects and
languages. In the streets or in the countryside, it was easy to identify
where they lived and what their trade or station in life was just by their
dress.

The way we dress has changed since then and the diversity by region, so
rich at the time, has faded away. It is now hard to tell apart the inhabitants
of different continents, let alone different towns, regions, or countries.
Perhaps we have traded cultural diversity for a more varied personal life—
certainly for a more varied and fast-paced technological life.

At a time when it is hard to tell one computer book from another, Manning
celebrates the inventiveness and initiative of the computer business with
book covers based on the rich diversity of regional life of two centuries ago,
brought back to life by Grasset de Saint-Sauveur’s pictures.
Part 1. Motivation and basic concepts
Part 1 consists of a single chapter that orients you to the basic concepts
that will form the backdrop for the rest of the book. These include artificial
intelligence, machine learning, and deep learning and the relations between
them. Chapter 1 also addresses the value and potential of practicing deep
learning in JavaScript.
Exploring the Variety of Random
Documents with Different Content
her usual remark when Gabriel had particularly angered her.
"Don't be too sure, lass. I've no call to fight his battles, seeing how
often he's bothered and bothered me about my soul—but this I'll say
for Gabriel Hirst: he's no woman at the heart of him. Greta, I'd think
shame if I was you to set so much store by the outside."
"I don't like an apple with an ugly rind, however good it be inside,"
said Greta, crossly.
"And there you make your mistake, as women-folk mostly do. Give
me the ugliest-looking apple you can find, and I'll know it's worth
eating."
"But Gabriel isn't ugly," flashed the girl, perversely.
The miller laid down his pipe, and looked quizzically at his daughter.
"Has he snared thy heart, lass, this preacher fellow?"
Greta tossed her head, got half-way through a denial, and ended
with a storm of sobs.
"There, there, Greta, don't cry," murmured Miller Rotherson, as she
came to his knee and buried her head out of sight. "Supposing he is
too blind, this Gabriel Hirst, to know a good thing when he sees it—
there are other men in the world."
She lifted up her head at that and pushed back the hair from her
eyes.
"But not one that can come near him, father."
"Well, well; I never did understand the twists and the turns of you
women, and I never shall, as I told your poor mother most every
day of her life. He's such a woman, sings the lass one minute, and
the next——"
"So he is," quoth Greta, and ran from the room to tidy herself.
And all this, as has been said, bothered Griff Lomax no little. He felt
like a father to these two young people, and had set his heart on
their making a match of it. He was in and out of the mill a good
deal; old Rotherson took kindly to him, and Greta grew to regard
him in the light of a hail-fellow-well-met sort of comrade, who
showed no disposition to make love, and who was yet willing to
serve as a friendly basis of jealousy when the occasion demanded it.
And all the while Griff never once guessed that he was himself
walking—nay, running—into deep waters. The mother and he went
very often across the three miles of moor that lay between
Marshcotes and Peewit House. Almost as often Kate Strangeways
walked to the Manor; sometimes she sat by the parlour fireside, with
her hands in her lap, enjoying the sensation of being thoroughly
idle; sometimes she played the model in the snug little studio
upstairs, and watched Griff as he plied his brushes. True, he had
asked permission simply to paint her portrait; but he wanted more
than that—and, wanting it, contrived in his usual headstrong way to
obtain it. There was no trace of self-deception in his enthusiasm for
Kate's strong, lithe type of beauty. It was with an artist's zeal that he
seized this and that new pose, or altered expression; and if he was
gentler with her after the fatigue of posing, more solicitous that she
should not tire herself unduly, than was altogether necessary—well,
how could he help it, when he had, in very fact, been searching after
this treasure-trove of his ever since he took to painting?
Mrs. Lomax buzzed in and out of the studio while they were at work,
and was disposed to blame Griff for what she called his callousness
in the matter of his model's welfare; at times she even went so far
as to be indignant that the boy could be so blinded by his art as to
lose sight of the good red gold that lay beneath the surface of Kate's
quiet manners. But she never stopped to picture what must happen
should Griff once dig down to the gold and set his heart on wealth
that belonged to his neighbour.
Only Roddick guessed which way the wind was blowing, and he kept
his opinions to himself. Griff would ride over to Wynyates two or
three times a week, and he rarely left without a word or two about
the woman who lived across the moor.
"Across the moor she lives, do you say?" Roddick had asked, with a
start, the first time Griff had mentioned her.
"Yes; what of that? You look as if there were some one hereabouts
in whom you are interested. Is that the reason——"
"Pish, romantic boy! I'm interested in grouse, trout, and rabbits;
don't saddle me with your women." But he recurred to the topic for
all that, as Griff was mounting Lassie at the gate. "Does she live on
the Marshcotes moor?" he asked suddenly.
"No, the Cranshaw side," said Lomax, with deliberate intent to take
Roddick unawares.
"By God!" muttered Roddick, under his breath.
Griff saw the contraction of his brows and laughed.
"So that is the trend of your secret, is it? Put your mind at rest, old
fellow; she lives on the Marshcotes moor right enough, and she is
the wife of a master-quarryman."
"You're a fool," said Roddick, gruffly, and shut the door with a bang.
—"Why the devil won't Lomax let my secret alone?" he muttered,
stirring up the fire in his parlour. "Jove, though, I fancied for the
moment that Frender's Folly was his destination; Janet might care
for a man of Lomax's build—the Lord knows why she picked me out
from the crowd—and that's just the rub of it all. Oh, my God, if only
I were free!"
After that evening Roddick learnt a good deal about Kate
Strangeways—or, at any rate, about Griff's conception of her. He was
an astute man where other people's follies were concerned, and he
could have told Lomax that the adventure was bound to end in one
of two ways.
"He wouldn't believe me, so where is the use of telling him?"
Roddick argued. "For a clever man, old Lomax is pretty blind—yes, a
confounded ass whenever a woman is toward. This is biting deeper
than he'll like, though, when he comes to open his eyes; it's not the
trashy stuff he called love while the Ogilvie woman had him in tow.
Well, I'll wait; there'll be a cheerful blow-up one of these days."
But neither Griff nor the old lady of the Manor thought of coming
evil. They walked far and wide by day, and at night they chatted of
old times, of new endeavours, by the parlour fire. The itch for work,
too, was taking a surer hold of Griff, and he was well satisfied with
the progress of his picture. Autumn had long ago failed to winter,
and the moors were looking their best; the heather had lost its
gaudy raiment of purple, and stretched away in patches of rusty
brown, of sober red, that fitted better with its savage dignity.
Overhead, on the fine days, were wonderful shifting tints of sapphire
and clear-cut green, with sunsets that stretched, purple and
crimson, along half the horizon edge; then, again, the wind would
shift to rain, and the sullen banks of yellow would come crowding
across the sky from over Ling Crag, and the tremor and stress of
storm would sweep into the man's heart. And all the while the
woman across the moor grew dearer to him; she was part and
parcel of the heath he loved, the sunsets that fired him to
endeavour, the wind that made him drunker than wine could ever
do. If he failed to look at the situation squarely, it was because Kate
was always there, to be seen whenever the wish moved him; had a
rival stepped in, or had she left Marshcotes for a space, Griff would
better have understood it all.
Kate Strangeways, too, began to find heart again, began to feel the
old use of her limbs and the old relish for a gale; she wondered, now
and then, what had wrought this change in her, but it was long ere
she was brought to confess that she counted the days between visit
and visit of a man who had troubled himself to bring fresh interest
into her dull round of care. Her manner towards her husband
changed; she found courage to fight him, and she conquered; she
furbished up a little bedroom facing south, and maintained her rights
of property therein, and did not stop to inquire what instinct
prompted her to privacy.
As for Joe, he got drunk oftener nowadays; his will held altogether
too much parley with the shadowy places, and, as a consequence,
he blustered more and was less capable than ever of backing up his
bluster. Just once he tried to trespass on Kate's private domain; it
was a night of late November, and he had sat up chatting with
Hannah, the maid-of-all-work, after his wife had gone to bed.
Hannah was even a little sourer than her wont, and she gave
Strangeways a lengthy account of young Lomax's comings and
goings.
"I'd be shamed, if I war a man, to put up wi' my wife's hoity-toity
ways, same as tha does," she snarled, with a freedom born of the
sense that she was talking to one of her own class. "She mun sleep
i' her own bedroom, mun she? Happen there's more i' that nor there
seems, if tha'd getten a couple of een i' thy heäd."
"What dost 'a meän? Come, out wi' it; I cannot abide thy ins an' thy
outs, an' thy shammocky ways o' talk. There's no mouse-holes about
me, an' I look to find other fowk talking fair an' square. What dost 'a
meän, woman?"
"Nay, if tha cannot guess, it's noan for a honest woman to tell thee.
Didn't I say 'at young Lummax comes an' goes for all th' world as if
he war th' maister? If that isn't enow, I'd like to know what is?"
Joe brought the bowl of his pipe down hard on the grate and
smashed it.
"She shall shift her quarters to-neet, or I'll shift mine," he muttered.
"Fine talking," sneered Hannah.
"Hod thy whisht, wench! I tell thee I'll teach the wife to come it
ower me; ay, that I will," said Joe, doggedly. He kicked off his boots
and went shambling up the stairs; tried the handle of Kate's door,
and found it locked; swore at her and commanded her to open. She
did open at last, and stood on the threshold. She had taken off the
bodice of her dress, and her bust and beautiful bare arms showed
faintly by light of the candle behind her. Joe, despite his sodden
state, felt something of the old desire as his eyes took in the contour
of her figure.
"What do you want?" she demanded.
"It's lonely wark, Kate, living wi' a wife that's no wife, an' I willun't
stand it."
"When you had me, Joe," said she bitterly, "you were never so free
with kindness. A woman gets tired of being kicked out of bed, and
I'm not going to risk it again."
"When fowks is wed, they're wed. Me an' thee's teed fast as parson
could tee us, an' I've a right to thee—ay, that I hev—a right o' law,
an' a right o' parson."
A swift smile came to Kate's lips, as she straightened herself and
sought his eye in the semi-darkness.
"Then, Joe Strangeways, you can go for the parson and bring him to
help you; for you'll never touch me again, if I have to fight the lot of
you."
"I'm a honest man," Joe declared, after a disconcerted pause.
"It's a queer country that would call you honest, Joe." The wife was
feeling almost flippant for the moment, as the stronger sort of
women do in moments of strain.
A long silence followed, broken only by the shuffling of Joe's feet,
and the ticking of the clock in the kitchen down below, and the rattle
of mice behind the wainscoting.
"I'm a honest man," reiterated Joe at last; "an' dang me if I'll see my
wife go wrang wi' th' first fine gent what taks a fancy to her."
"Go wrong!" she cried, with a sudden blaze of fury. "You dare to
come to me and——"
Joe felt vaguely that he was getting the advantage now that he had
made her angry.
"Ay, go wrang; that's what it's leading to," he responded doggedly.
All the fight went out of Kate. He had brought home to her at last
what she had hidden from herself all these months: she was face to
face with the truth, and she saw in a flash the dreary stretch of
years that spread before her—after she had proved true to her
conscience—after she had said good-bye to Griff, and they had each
gone their ways. Without a word she turned; before Joe had divined
her purpose, she had locked the door in his face and left him on the
cold landing to marvel at the queer ways of women. She threw
herself on the bed and cried her heart out, while her husband
growled his way to his own room. She wanted never, never to see
Griff again.
But Griff himself chanced to ride over the very next morning, and he
altered her outlook on things. The clear, friendly look in his eyes—
the easy talk on this or that topic of interest which they shared in
common—his kindly insistence that she was far from well, and that
he meant to tell his mother when he got home how little care she
took of herself—all helped her to view the last night's misery in a
quieter light. With a quick feminine subterfuge she told herself that
his regard for her did not go very deep; if her own went deeper,
need she make herself foolish in his eyes by bidding him never come
near her again?
After he had gone—with a faint wonder in his mind at her changed
manner—Kate went over all that she had suffered at her husband's
hands; and across her honesty of purpose struck a swift desire to
take life while she had it and enjoy it to the full. She put the desire
away from her; but it returned day by day, and she grew less eager
to cast it out. Gradually she let the old life go its way; Griff came and
went, and she was glad to see him; she would not look behind.
But Roddick, in amongst his own perplexities, found time now and
then for a sardonic grin, and a wonder as to how soon the climax
would be reached.
And the climax came sooner than he expected.
CHAPTER IX.
CONFESSION.

Kate Strangeways, after her sudden collapse before Joe's accusation,


nerved herself to the fight once more. Joe attempted to take up the
same line on the next night, and was beaten; at heart he was afraid
of her, because he knew her to be stronger, finer in breed, than
himself. Then, gradually, he grew mortally sick of her, now that she
showed so uncompromising a determination to stand on her own
level. He conceived an idea, and soaked the idea in much strong ale
until it mellowed.
"When a gentleman born," said he to his mug, "when a gentleman
born taks th' trouble to come aboon three miles i' search on a
wench, he allus hes one notion. Well, I'll let 'em bide, that I will, an'
I won't break th' bones i' his body, 'cos he's ower big for that kind o'
marlaking. They shall just go their own foul gate, an' we'll see what'll
come o' my fine lady's airs an' graces when this Lummax hes
dragged her in th' mire. She puts up her high-bred nose, does she,
when I get a bit on th' booze now and again? Well, it'll be six o' one
an' half a dozen o' t' other sooin."
So Kate, thanks to a resolve of which she guessed nothing, had a
whole month's respite from her husband. He went out every night
directly after tea, and rarely spoke to her during the few moments
when they were together. She took the respite gladly, and flattered
herself that the trouble with Griff was assuming no more alarming
proportions as the days went on. Yet she wondered, and ached, and
cried at rare intervals, just because he could maintain his friendly
attitude so easily; freely would she have forgiven him if he had
faltered once or twice in well-doing.
"Shall we go to Peewit to-morrow? I promised to take Kate some
books," said Mrs. Lomax to Griff, one evening, as they sat in their
favourite nook by the parlour fire.
"You oughtn't to, with that cold of yours. Why will you never look
after yourself, mother?"
"Don't coddle me, Griff. My cold must be driven out by some good
frosty air; the walk will do me good."
But she was worse on the next morning, and Griff put his foot down
in a way that even his mother understood. He sat with her until
three o'clock, and then she insisted on his going for a run on the
moors.
"I'll walk across to Peewit, if you like, and take the books with me,"
he said, turning at the door. "It will give me an object in going out."
"Very well, dear. You will find them in my room, on the table near
the window."
He stowed away the books in sundry capacious pockets, and set off
towards the moor at a swinging pace. It was near the end of March,
but the frost, repenting the easy winter it had given the Marshcotes
folk, had suddenly bestirred itself and gripped the moorside
shrewdly. Just as Griff left the churchyard, he met Greta Rotherson
on her way to the village.
"You're enjoying the frost, too?" he said, coming to rest against a
gate.
"No, I'm not," retorted Greta, crossly; "it's far too cold, and the end
of one's nose gets red."
"Not your nose, at any rate; your cheeks have used up the supply.—I
saw Gabriel this morning for five minutes."
"Did you?" Disdainfully.
"Yes; he called at the mill last night, and came round to tell me how
disappointed he was to find you out."
"To find father out? He would be: we were with friends in the
village."
"Look here, Miss Rotherson—why do you treat poor old Hirst as you
do?" queried Griff, bluntly.
"I don't know what you mean, Mr. Lomax. Why should I treat him
differently?"
"Because—well, being a woman, you know more than I can tell you.
It seems a pity, that's all; he worries about things."
Greta dropped her air of aloofness.
"Gabriel Hirst," she snapped, "will never get rid of his preaching. If
he was making love to a woman, he'd quote Scripture in the middle
of it—and a woman doesn't want that."
"Well, no, she doesn't. But women were made to put up with things.
Can't you get at the man in Gabriel, and let the preacher go hang?"
"I can do the last thing certainly. Good day, Mr. Lomax: you seem
very anxious to get your friend settled in life."
The sun was dying bloodily behind Peewit House as Griff climbed the
last stretch of rising ground. The clouds showed stormy. A dun mist
hugged the skirts of the moor.
"This is cheery after the cold look of things outside," he cried, as he
stretched his legs before the fire.
"It was kind of you to bother about the books: you will have a
stormy walk back, I'm afraid." The trouble of contact with him
weighed heavily on Kate for the first moment; she could scarcely
find words in which to answer him.
"Ah, but that doesn't matter when you can see in the dark, as we
moor folk can." He was curiously insistent on that moor bond
between them. "Will you let me smoke just one pipe, and then I
must be off; mother is down with a cold, and I promised not to be
away for long."
He lit his pipe, and Kate Strangeways went out in a little while, to
return with tea and buttered toast; they fell into some out-of-the-
way topics over the tea, and continued them until another pipe, and
yet another, had been smoked. Griff had forgotten all about the
time, and his companion, while she remembered it, remembered
also that Sunday was a day which her husband invariably spent at
the Marshcotes inn, and that he would not be back much before
midnight at the earliest; she had felt lonely before Griff came, and
she wanted him to stay as long as forgetfulness of the hour would
let him.
But he rose at last and looked at his watch.
"I really must be off; do you know what time it is, Mrs.
Strangeways? The mother will think I have strayed into a bog, or
something, if I keep her waiting much longer. Good night. No, don't
come to the door; it is too cold for you."
"Too cold for you." There was a tenderness in the thought that
soothed the woman; there was an off-hand friendliness in the tone
that hurt her in some unexplained way.
He opened the heavy oak door, with its armour of nails and bolts
and its out-of-date lock. A solid wall of fog came up close to the
steps in front; snow showed white on the threshold, and drifting fog
and snow combined took traveller's leave of the ingress afforded by
the open door.
"You can't cross the moor until the fog lifts," said Kate, at his elbow.
"But I must. Mother will be sick with fear when she sees how bad
the night is."
Instinctively she laid a hand on his arm.
"Better that than death," she said quietly.
"I can find my way in a fog; it is only a little extra darkness, and I
know every inch of the way."
"Nonsense!" she said sharply. "No one can be sure of the road in a
fog, and there is snow as well. I tell you, it is madness to venture
out."
Griff Lomax could not but admit as much, as he obeyed the pressure
of the hand on his arm.
"It will clear presently," he said, shutting the door, and following the
woman into the parlour.
"There's more nor one kind o' storm brewing, I fancy," muttered
Hannah, peering through a nick in the kitchen door.
The evening wore on. From time to time Lomax went to see if there
were any change in the weather, but the fog showed no sign of
lifting, and the snow crept earthward in bigger flakes than ever.
"You must spend the night here," said Kate. Her voice was
peremptory, but a hot blush came to her cheeks.
"I ought to make an attempt to reach Marshcotes," muttered the
other, doubtfully. Reason told him how foolhardy such an
undertaking would be.
"With the snow covering every track? How can you, even if the fog
clears?"
He gave in at last, as he was bound to do; but, once the point was
settled, there was ample room for other disturbing thoughts. Hannah
put her head in at the door presently.
"Shall you be wanting owt more to-neet?" she demanded.
"No; you can go to bed. Good night, Hannah."
"Good neet, mum."
Hannah's tread on the upstairs journey was heavy; her downward
steps, some few minutes later, were correspondingly light.
There was a silence between the two who were seated on either
side of the great peat fire in the parlour. Lomax pulled at his pipe
and stared into the glowing peat-ash; the woman watched his face.
He grew conscious of her gaze, and turned his eyes suddenly to
hers.
The months had been slow to teach him, but he learned their lesson
now. As the seasons had run their course, the man's great love had
been growing—growing so silently, so little at a time, that he had not
once pulled himself up to say, "This is love that has you by the
throat; thrust it off while you can." And now—now, all in the space
of that quick uplifting of his eyes to hers, he had come to
understand. Nothing he had felt, read of, dreamed about, was like
this masterful reality; it hurried him along blindfold, as the welter
and swing of a gale from the north had now and then driven him
clean off the moor-track—into the bogland, it might be.
He leaped from his chair, and crossed over to her, and put his arms
about her. She spoke no word, and he was silent; but her lips went
out to his.
The reaction followed. He set her free, and strode restlessly up and
down the room, with its black oak panels, its ridiculous china dogs
on the mantelshelf, its fiery eye of smouldering ash. She followed his
steps with her eyes, and cared not one whit save that he loved her.
"See, Kate," he said, coming close to her again, "you are the wife I
should have had, but you are not free to hear me tell you so. We
must go apart, you and I, lest—my darling, my darling, how I want
you!"
Conscience, stilled for awhile, raised its voice. The woman warded
off that second caress with which the man was minded to point his
logic.
"Let me alone, Griff! Let me go. You know it is not right."
He stood irresolute. The worst and the best in him fell to blows, and
fought the quarrel out to the bitter end. Then he put his lips to her
hand, and raised her very gently.
"Show me to my room, Kate. It is time you were asleep; you look
tired," he said, as nearly in the tones of the friend of yesterday as he
could contrive.
She lit two candles, gave him one, and preceded him up the
creaking wooden stairs. She let her hand rest in his for a space at
the door of his room, then left him.
At eleven of the same morning, the godly folk of Marshcotes, clothed
in their Sunday best, were singing lustily within the bleak walls of
the Primitive Methodist Chapel; other godly villagers were singing
with slightly less vigour in the Parish Church across the way. Joe
Strangeways' mind, however, was set on other things, as he
shambled across the ill-paved square that fronts the churchyard. He
glanced at the church clock, and leered at large upon the village.
"Eleven of a Sunday morn, an' me noan drunk yet," he observed.
"Dang me, but that beäts all."
By way of repairing this slight omission, Strangeways entered the
Bull. The fog was thick in his brain, and thick on the landscape,
when he emerged. A friend in need guided him to the verge of the
moor, but it was clear that there was to be no getting home that
night; so the friend guided him back to the Bull, and it was seven of
the next morning when he set off for Peewit, to change into his
working clothes before going to the quarries.
Hannah clattered to meet him as he entered.
"I telled thee how it 'ud be," she said, with a toss of the head. "Griff
Lummax war up yester afternooin an' stayed his tea."
"Stayed his tea, did he? Can't he get decent pickings at home?"
muttered Joe, whose head and temper were alike impaired by his
carouse.
"An' after that he stayed th' neet. They reckoned it war too wild for
him to cross th' moor. Too wild! I'd hev crossed myseln, it war that
bright."
"Nay, lass, tha'rt wrang there. It war thick, main thick, or I'd hev
been home long sin'."
"Drink maks a man see thick," observed Hannah, dispassionately.
And Joe took to himself a shamefaced look.
"Did tha see owt?" he asked presently.
"See? Ay, a bonny sight too mich. I saw 'em kissing by th' parlour
fire. An' at after that—well, th' missus knaws best what happened at
after. See yonder, he's coming dahn th' stair now, fair as if he owned
th' place."
Joe's face grew black with rage. He never doubted Hannah's story,
to its uttermost detail. This, then, was what he had worked and
hoped for—the wife who had scorned him was on his own level at
last. Yet he was not pleased, when it came home to him how well
his plan had succeeded; his jealousy was roused; he felt the need of
Kate more than he had yet done in his six years of courtship and
marriage. He stood with his hands behind him and watched Griff
come down step by step.
"Tha'rt i' th' wrang house, seemingly," he growled.
"Through no fault of mine. Why didn't you return last night?"
retorted Lomax, quickly. He had not given thought enough to Kate's
danger; but he realized now that he must carry the thing through
with a high hand, if the ugly brute at the stair-foot were to be
silenced.
"'Cos I war drunk," retorted Joe, succinctly.
"Well, if you had been sober enough to take a square look at the
weather, you'd have seen the snow and fog. I preferred a roof over
my head last night, and your wife offered me one. I'm obliged to you
both, Strangeways."
"Oh, th' wife offered it, did she? Then th' wife shall pay for it,"
muttered Joe.
Griff went up to Strangeways, and took him roughly by the coat-
collar.
"And you shall pay double if you lay a finger on her. You surly brute!
To threaten your wife because she kept a man from starving on the
moor. Strangeways, I've a mind to give you one thrashing on
account—another to follow if you don't behave yourself."
He took a square look at Joe's eyes, saw that the man feared him
beyond all promptings of rage, and swung out of the house. But he
was sorely troubled about Kate as he went across the glittering frost-
flakes to Marshcotes Manor.
CHAPTER X.
THE WOMAN OF SORROWSTONES SPRING.

Between Marshcotes and Cranshaw the highroad runs for a mile and
a half. From Cranshaw to Ludworth in Lancashire is a very good six.
The hill rises sharp after you pass Cranshaw Church and the wild,
wind-swept burial ground; and well towards the top, soon as you
gain the open moor, a grim line of "stoups" guards the right hand of
the way. It is an eerie road to travel, especially if night has fallen and
brought you no company. The stoups, huge blocks of millstone-grit,
white-washed at the base, blackened at the top, seem to stand out
from the darkness, to move towards you almost. Year after year they
have stood there, pointing the way to travellers: if snow be thick on
the highway, their black crowns show clear against the white; if the
moor lie black, their white bodies point the way of safety. Year after
year, with frost and rain and snow, the rough moor weather has
made sport of the stoups; they are workers of charity, and buffets
are their fit reward. It is vain to call them senseless stone, and pass
them by, and think no more of it; they stop you, willy-nilly, with their
rough-hewn, tragic faces; they have lived in the silent places, and
the mystery of a long loneliness is theirs. A true man done to death
by the cold was the cause of their being, and many a true man killed
by harsher foes has gone to swell the tale since then. More than
once, or twice, or thrice, has murder walked beside those silent,
ghostly stoups, and the bogs to right of them could tell some
fearsome stories if they chose.
It was then some five and twenty years since Joshua Lomax, Griff's
father, tried to cross from Ludworth one bitter winter's night; they
found him a mile from the highroad, dead from exposure, and his
widow, as soon as she could bring herself to read other people's
welfare through the crystal of her own trouble, made haste to build
the sentinel line of stoups, lest more good lives should be sacrificed.
Griff could not bear to walk that road for many a long day after the
tragedy, and even now he shuddered as he gained the outposts.
Tinker's Pool glooms down in the hollow, just beyond the last of the
stoups, and the gamekeeper's house stands at the top of the road;
between the two lies Sorrowstones Spring—a two-roomed,
crumbling cottage that gets its name from the well-spring at the
door. Rachel Strangeways, the quarrymaster's grandmother, had
lived here time out of mind, and she would have found it hard to
chance on a dwelling more to her liking. Rachel was reputed a witch
throughout the countryside; maidens came to her, in fear and
trembling, to have their fortunes told, and burly farmers sought her
aid whenever the Evil Eye was working havoc among their cattle.
She dealt in drugs, too, and great virtue was attached to an infusion
she prepared of a certain bitter herb which only grew on the marsh
that hugged her door. Her eighty-five years had bowed her body to
the proportions of a hunchback's, and there was an evil light in her
blue-green eyes that did not fit ill with her reputation. Whenever Joe
found himself in straits he repaired to the maternal roof-tree, for
Mistress Strangeways could show good common sense on occasion.
Joe walked over to the cottage on the night following Griff's stay at
Peewit House. He entered the living-room without knocking, and
found Mistress Strangeways huddled over the embers of a poverty-
stricken fire.
"Well, mother," said he, "I'm i' a queer way."
Rachel gibbered over her ashes awhile, then looked up. Her blue-
green eyes grew almost soft as they rested on this scrubby-bearded
clown, who was yet bone of her bone. For there had been a time
when the old witch's hand was not against the world, nor the world's
hand against her; that was in the days when she and her man had a
spruce little cottage at the edge of the moor, and a strip of garden
where the peonies and the sweet marjoram and the ladslove grew,
and one little lass to fend for. The little lass had grown up into a
slim, well-favoured maid, and the mother had loved her after the
profligate fashion of these rough-speeched, tender-hearted women
of the uplands. And Mother Strangeways' heart was broken, once for
all, when the girl died in bringing Joe to a shameful birth; she did
not rail against her daughter, but against the world that had
wronged her, as the way of her class is; and she hardened herself
against all men living, and buried her husband in due course, and
came to this battered, wind-swept cottage to live out her days. And
Joe Strangeways, who had inherited neither his mother's
fearlessness nor his father's breeding, was all she had left in the
world to cherish and frame plans for.
"So tha'rt come to me?" she muttered, still with her eyes on Joe's
face. "So tha'rt come to me? Ay, it brings men to their women-folk,
does trouble; year in an' year out, I niver see thy black face, Joe,
without there's trouble agate. Sit thee dahn, lad; sit thee dahn, and
let's know what's toward."
"Just this—my wife's gone wrang wi' a gentleman. I could ha' borne
it better if he'd hed rough talk an' a rough pair o' hands."
Rachel stiffened her dwarfed old body.
"An' who may it be, Joe?"
"Griff Lummax, out to Marshcotes Manor. I knew how it 'ud be when
th' mother—th' girt, ugly man of a figure—got coming it ower Kate."
The blue-green eyes shot fire.
"Then why didn't tha get him by t' throat, and squeeze th' life out on
his body?"
"'Cos he's ower strong," growled Joe.
"Ower strong, ower strong!" flashed the crone. "I didn't talk i' that
way when I hed th' use of my body an' wits. Tha'rt noan o' my flesh,
Joe—no, nor bone o' my bone, nawther—shame on thee, lad, for a
shammocky nowt of a man." She pushed her skinny face close up to
his. "Dost mind what Joshua Lummax, Griff's father, did to thy
mother five an' thirty year agone?" Her voice crackled and hissed like
the fall of water on live coal. "Dost mind how he came wi' his fine
airs, just same as th' son hes done to thy wife, an' witched th' heart
out on her? Dost'a know i' what fashion I sarved him?"
"Tha did nowt," muttered Joe, surlily; "tha gabbled an' gabbled for a
fearful deal o' years, an' th' cold took him off i' th' end. Dunnot thee
talk to me till tha's getten summat to show for t' to-do tha'rt
making."
Still closer the lean face pressed to his. She whispered something in
his ear, and he glared at her with an admiration touched by fear.
"Art 'a leeing, mother?" he demanded.
"Leeing? No, by God! I hed my rights i' th' end, an' th' lass sleeps
quiet i' her grave. Thee see to thy own porridge, Joe. I'm ower owd
to cook for other fowk."
"Tha'rt a sight fuller i' th' wit nor me, owd or young. What mun I do,
mother?"
"Do? Kill him, I tell thee, an' off wi' them Lummax peacocks for
gooid an' all. That's th' porridge tha hes to cook."
"She came it high an' mighty ower me, did Mrs. Lummax; reckoned
she'd gie me a bit o' stick, she did. More nor once her son hes hed
th' laugh on me, i' sight o' all th' Marshcotes fowk. I owe him a two
or three hard knocks—ay, that I do."
"Then gie 'em, tha lout! Childless am I this day—not counting a six
ha'porth o' copper like thee—an' childless tha'll mak th' Lummax
woman. Ower strong, is he? Lig i' a hedge-bottom, then, an' crack
his skull wi' a pickaxe."
Joe kicked at the smouldering peat, but his face showed no
responsive enthusiasm.
"Tha itches to see me dangling at th' end on a hangman's rope,
that's easy to be seen. Dost 'a think a plain man can kill gentlefowk
same as he'd lake at a bit o' pigeon-shooiting, an' niver hear no
more on't?"
"Hes Mother Strangeways swung for Joshua Lummax? Nay, tha
shames me, Joe, tha shames me. I mun ha' kept thee ower long at
th' bottle; tha'rt a mammy's lad, a right mammy's lad." She rose
from her bench, and her hands moved swiftly, the claw fingers
keeping time to her thoughts. "Christ! if I war only young again!"
she shrieked. "If I could han'le a knife—or an iron bar, mebbe—I'd
hev my rights o' yon Lummaxes." She fell once again to a sitting
posture, making hideous mouths at the fire. Then a fresh train of
ideas was started, and she looked up at Joe with a cunning leer.
"Blood's blood," she crackled, "but swinging's swinging; an' happen
tha can hurt him war nor even killing 'ud do. They're fearful proud,
them Lummaxes; break 'em, lad, break 'em wi' law; set their names
on th' housetops, an' mak 'em a bye-word i' th' land. Ay, hev th' law
on 'em, an' bide thy own time for th' rest."
"Th' law?" snarled Joe. "Th' law is a matter o' brass, an' nowt but
brass. Him 'at's getten th' fattest purse can allus best a poor man.
Nay, doan't thee talk to me about law."
"Wilt 'a hearken to sense, or willun't 'a? Thee go to-morn, i' th'
dinner-hour, to Lawyer French i' Marshcotes. He's a sharp un, yon,
an' he kep' me my bit o' freehold when Squire war minded to set
me, bag an' baggage, on th' roadside. Ay, Lawyer French bested th'
Squire an' proper."
"An' charged thee a pretty penny, I'll be bound."
"Not more nor a poorish woman could pay; an' he'll noan charge
thee more nor tha can pay."
"Well, I mak nowt o' sich things. What sort of a figure should I cut i'
th' witness-box, afore judge, jury an' all, swearing away my pride i'
my own wedded wife?"
"Oh, ay, tha's showed thyseln mighty proud on her, hesn't 'a, Joe?"
snapped the mother. "It'll break thy heart, willun't it, to lose thy lass?
What tale didst 'a come to me wi' a four months back? That she
wouldn't do this, an' she wouldn't do that, an' tha wert main weary
o' th' sight on her."
"But I'm noan for making her free to marry this Lummax lad."
"Marry, sayst 'a? He'll noan marry her, if I know th' gentry. Tha'll hev
one less mouth to feed, an' Kate 'ull hev to set to an' fend for
herseln."
"Begow," muttered her son, after a lengthy silence, "tha allus did gie
a chap a bit o' gooid, straightforrard sense. I'll off to this lawyer
chap to-morn, dang me if I don't!"
Rachel crouched over her fire after he had left her.
"To hev a babby like yon for a grandson," she grumbled. "Cannot
move hand nor foot by hisseln. Eh, eh, to hev the free swing o' my
own arms again, an' young Lummax at t' other end on a mattock!
But I'm owd, owd; nawther spells, nor muscles, wark as they once
did. Almighty God, if tha'd only mak me strong for a day—just for a
day!"
CHAPTER XI.
THE GHOST OF WYNYATES.

Vague rumours began to come to Griff's ears nowadays, and people


stared curiously at him as he passed them in the street.
"Look here, Gabriel, what's in the wind?" he asked bluntly, while the
preacher and he were taking a walk together one afternoon.
Although the summer was well advanced now, Joe Strangeways,
despite his ready acquiescence in the old witch's advice, had but
lately summoned resolution enough to take him to Lawyer French's
office. But his tongue had not been idle in the meanwhile.
Gabriel was not the man to break any news gently, nor to beat about
the bush; he lacked the guile. So he rested a steady eye on Griff,
and—"They say that matters are wrong between you and Kate
Strangeways," he said.
Lomax met the preacher's eye squarely.
"Do you believe their tales?"
"I want not to. Lad, it would break my heart to believe it of you. Can
you give me your word it's false?"
"As false as the liar who set it abroad. You can believe it or not as
you like; but we're free of that charge."
Griff was hurt that the story was going abroad—hurt by a
remembrance of his part in the scene which was responsible for it,
hurt by the preacher's momentary doubt.
"Forgive me, Griff; I might have known," said Gabriel Hirst, and
accepted his friend's word for good and all.
A night or two later, as Lomax was coming home from the moor, he
saw Joe Strangeways go in at the Bull doorway; the oil-lamp at the
corner showed an evil look on the quarrymaster's face. Without
pause or hesitation, Griff followed him into the noisy public bar.
There was a shuffling of feet, followed by a silence.
"Strangeways, a word with you," said Griff, standing in the middle of
the floor.
Joe laughed, and never so much as glanced at his enemy.
"Stand up, and come over here."
Still the quarrymaster did not look up, and Lomax crossed the floor.
"You're a heavy weight to lift, and I'd rather you came without
fetching; but——"
Joe abandoned his defiant attitude on a sudden; he remembered
that evening when Griff had laid him prone, with his feet on the top,
and his head on the bottom, step of the Bull doorway. He got up
reluctantly, growling as he went. Griff set him with his face to the
company.
"You have heard strange tales of me lately, neighbours?"
A subdued hum was the only answer.
"They came from Joe Strangeways here, if I'm not mistaken. Speak
up, Joe! What have you got to say by way of proof?"
"Hannah see'd wi' her own een——" began Joe, then stopped.
Lomax was so confoundedly cool about it all.
"Can you swear to that? Or am I right in guessing that Hannah lied
to you, and taught you the lie pat off?"
This new suggestion staggered Joe's muddled wits; his knees shook
under him, and he could make no answer. Griff waited for a space,
nodding meanwhile at the landlord, who had come to the door to
hear what was going on.
"Then I think I needn't keep you any longer, friends," he laughed at
length. "Landlord, drinks round; it's thirsty work watching a liar try
to moisten his tongue."
He turned to leave; and Joe was never the one to neglect the
chance afforded by an adversary's back. He seized a pewter-pot and
hurled it with all his strength across the room. Griff felt it whizz past
his ear, turned sharp round, and made for Strangeways in a fit of
mad fury. He already had his hands at his throat, when a sudden
thought pulled him up—a brute the man might be, and a liar, but he
was Kate's husband. Nay, he himself was, in a measure, the
quarrymaster's debtor—he had filched a kiss that was rightly his; he
had stolen his wife's love from him.
"You were born a liar, Joe Strangeways. I'll leave you to it," he said,
and went out.
But a shout followed him through the door.
"I'll be even wi' ye yet, Griff Lummax!" yelled Joe, in impotent fury.
"Tha'rt ower big to be talked sense to; but thy wench's body shall
pay for what tha's said an' done to me. Ay, by God! we'll see which
on us is th' maister up to Teewit House! Twice tha's called me a liar,
an' I'll blacken her een for that—one for th' first time ye called me,
an' one for th' second."
"Hod thy blethering din!" cried one of his mates, roughly. "Tha'rt
nobbut a windbag, Joe, an' a foul-mouthed bag at that."
Again Lomax came back. A cold fear seized him, as he caught the
drift of the drunkard's threats; he had forgotten that his hasty
method of self-defence might place Kate in jeopardy. Again he stood
in the middle of the room and looked at the company; but his throat
was parched; he was sick with pity, wild with the thought that Kate's
name would soon be on every tongue here—would be bandied
across this reeking bar, among the shag-smoke, the dirty pots, the
beer-droppings on the floor.
"Tha'rt noan so pleased wi' thyseln, seemingly, as tha war a while
back," jeered Strangeways, seeing that Griff made no further
forward movement, but just stood there like one dazed. "Thee wend
home to thy mammy-bird, lad, an' let other fowks's wives alone for
th' future."
Still Lomax did not move. The wondering faces to right and left of
him showed so many blurred spots of white through the smoke
clouds. Every second that he stood there made against them—
against Kate and himself—yet the words would not come. The
quarrymaster grew bolder, and rose to an effort of wit.
"Landlord," said he, taking two greasy coppers from his pocket and
laying them on the table, "we're fine an' freehanded i' Marshcotes
Parish. 'Drinks round,' says Mr. Lummax; an', 'drinks for Mr.
Lummax,' says Joe Strangeways—— Come, Griff," he went on, with
brutal familiarity, "we'll sink th' woman i' beer; tak her for gooid an'
all if tha wants, an' we'll be mates, thee an' me. Let fowk talk. I bear
thee no malice, lad."
Griff found his tongue at last. The less sober of the company
afterwards declared that "it war as if fork-leetning war playing round
his face, an' his words came out like thunner."
"Strange ways, I never yet gave my word to a thing and then went
back on it. And I promise you now that if you lay a finger on Kate,
I'll smash every bone in your body."
"An' swing for 't?" sneered Joe.
"Ay, and swing for it, if need be," Griff answered, his voice falling to
a quietness that appalled the quarrymaster.
The landlord followed him into the passage.
"I'm fair sick o' yon Strangeways, sir. He's a surly wastril, as is allus
kicking up a row i' my public. Only, ye wouldn't be thinking o'
persecuting him for shying that there mug at ye? It 'ud be brought
in drunk and disorderly, sure as sure, an' that harms a respectable
public."
"Prosecuted?" murmured Griff. "No, of course not."
The landlord turned with a sigh of relief. Truth to tell, Griff scarcely
grasped what he had said. He was face to face with a situation
which, until now, he had realized but dimly. That swift understanding
of the thing called love had so lifted him out and beyond the little
world about him, had given him such new forces, new hopes, that
he had hardly paused to ask himself "What next?" To-night, though,
the matter was practical, urgent. Instinctively he made for Wynyates,
quickening his pace with every stride. Gabriel Hirst was coming out
of his gate as he passed through Ling Crag.
"Is that you, Griff? I thought it looked like your stride, though it's
almost too dark to see."
"Yes, it's I. I'm off for a tramp."
"Where to?" asked the preacher, trying to fall in with his step.
"The devil."
"Griff, Griff, what's this? To speak so to the man who's loved and
looked up to you—ay, looked up to you, for all your wild ways. Lad,
do you want to—to make an end of our friendship?"
Gabriel had grown very sensitive of late to changes in those he
loved.
Griff put out a hand into the darkness and gripped his friend's.
"Don't be a fool, old fellow. It isn't that—only, I want to be alone;
I've troubles to think out, and there seems to be no way to it yet."
"Can't you tell them to me, Griff? I might be able to help."
Griff hesitated a moment, then laughed to himself, as he put the
thought from him. The preacher was such a baby in women-matters;
how could he appeal to him?
"Thanks, Gabriel, but I couldn't explain—not just yet. I'll come to
you when the way shows a bit clearer.—Roddick has lived, and he's
tough. He ought to be good for something," he added, after he had
said good-night to Gabriel, and quickened his stride again.
He reached Wynyates, opened the door without knocking, and
stamped into the hall.
"Who's there?" came a voice from the room to his right.
Griff followed the voice. He found Roddick seated at the table, which
was covered with a jumble of cold beef, bread, apple-pie, cheese,
and beer.
"Oh, you, is it?" said Roddick, cutting himself another slice of beef.
"Why the deuce can't you enter in a Christian way? Have some
food."
"So I will. I'd clean forgotten supper."
"Forgotten supper, had you?" snapped his host, when he was fairly
launched. "A healthy man never does that. What's amiss, Lomax?"
Griff looked at him thoughtfully across the table.
"Something serious. I don't come for advice unless I need it."
"And then you don't take it. You always were a cross-grained beggar.
Well?"
"There's a woman in the case."
"Damn the women!" growled Roddick. "Have some more beef."
Griff said no more on the subject till they had turned their chairs to
the fire; then he made a plain statement of fact.
"So it's come at last, has it?" said Roddick, gruffly.
Griff flushed.
"Hold hard, Roddick; you're going a bit too far," he muttered, in
answer to the spirit rather than the matter of the other's words. "We
are innocent, I tell you!"
"Matter of terms, my boy. You kissed her, you say? It amounts to
much the same thing."
"It does nothing of the kind. Besides, what fault there was lies at my
door; she is not to blame."
"I never insinuated that either of you were to blame. I only said that
it amounted to the same thing."
A silence followed, broken at length by Griff.
"It's pretty hopeless, either way," he finished. "If I leave things as
they are, she runs a constant danger of being murdered by that
brute. If we cut the whole thing, and go away together, it will break
mother's heart."
Roddick had been oddly moved during this recital. Twice he had
been on the point of blurting out something that lay at the top of his
mind; thrice his face had grown soft with pity. It would not have
been Roddick if he had allowed these lapses to go without
correction.
"Well, you've got to choose," he said bluntly. "We always have to
choose when anything serious is at stake. Which is more to you, the
lover or the mother?"
Griff frowned at him.
"Roddick," he said, with just the trace of a catch in his voice, "when
I speak of my mother, I don't mean any conventional rot. All my life
she has been a lover and a friend to me."
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like