Contents
List of Figures
Tables
Deep Learning and Scientific Computing with R torch
torch is an R port of PyTorch, one of the two most-employed deep learning frameworks in industry and research. It is also an excellent tool to use in scientific computations. It is written entirely in R and C/C++.
Though still young as a project, R torch already has a vibrant community of users and developers. Experience shows that torch users come from a broad range of different backgrounds. This book aims to be useful to (almost) everyone. Globally speaking, its purposes are threefold:
Provide a thorough introduction to torch basics both by carefully explaining underlying concepts and ideas, and showing enough examples for the reader to become fluent in torch.
Again with a focus on conceptual explanation, show how to use torch in deep-learning applications, ranging from image recognition over time series prediction to audio classification.
Provide a concepts-first, reader-friendly introduction to selected scientific-computation topics (namely, matrix computations, the Discrete Fourier Transform, and wavelets), all accompanied by torch code you can play with.
Deep Learning and Scientific Computing with R torch is written with first-hand technical expertise and in an engaging, fun-to-read way.
Chapman & Hall/CRCThe R Series
Series Editors
John M. Chambers, Department of Statistics, Stanford University, California, USA
Torsten Hothorn, Division of Biostatistics, University of Zurich, Switzerland
Duncan Temple Lang, Department of Statistics, University of California, Davis, USA
Hadley Wickham, RStudio, Boston, Massachusetts, USA
Recently Published Titles
R for Conservation and Development Projects: A Primer for Practitioners
Nathan Whitmore
Using R for Bayesian Spatial and Spatio-Temporal Health Modeling
Andrew B. Lawson
Engineering Production-Grade Shiny Apps
Colin Fay, Sbastien Rochette, Vincent Guyader, and Cervan Girard
Javascript for R
John Coene
Advanced R Solutions
Malte Grosser, Henning Bumann, and Hadley Wickham
Event History Analysis with R, Second Edition
Gran Brostrm
Behavior Analysis with Machine Learning Using R
Enrique Garcia Ceja
Rasch Measurement Theory Analysis in R: Illustrations and Practical Guidance for Researchers and Practitioners
Stefanie Wind and Cheng Hua
Spatial Sampling with R
Dick R. Brus
Crime by the Numbers: A Criminologist's Guide to R
Jacob Kaplan
Analyzing US Census Data: Methods, Maps, and Models in R
Kyle Walker
ANOVA and Mixed Models: A Short Introduction Using R
Lukas Meier
Tidy Finance with R
Stefan Voigt, Patrick Weiss and Christoph Scheuch
Deep Learning and Scientific Computing with R torch
Sigrid Keydana
Model-Based Clustering, Classification, and Density Estimation Using mclust in R
Lucca Scrucca, Chris Fraley, T. Brendan Murphy, and Adrian E. Raftery
Spatial Data Science: With Applications in R
Edzer Pebesma and Roger Bivand
For more information about this series, please visit: https://www.crcpress.com/Chapman--HallCRC-The-R-Series/book-series/CRCTHERSER
Designed cover image: https://www.shutterstock.com/image-photo/eurasian-red-squirrel-sciurus-vulgaris-looking-2070311126
First edition published 2023
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
CRC Press is an imprint of Taylor & Francis Group, LLC
2023 Sigrid Keydana
Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged, please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access
Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for identification and explanation without intent to infringe.
ISBN: 978-1-032-23138-9 (hbk)
ISBN: 978-1-032-23139-6 (pbk)
ISBN: 978-1-003-27592-3 (ebk)
DOI: 10.1201/9781003275923
Typeset in Latin Modern font
by KnowledgeWorks Global Ltd.
Publisher's note: This book has been prepared from camera-ready copy provided by the authors.
List of Figures
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Preface
This is a book about torch , the R interface to PyTorch. PyTorch, as of this writing, is one of the major deep-learning and scientific-computing frameworks, widely used across industries and areas of research. With torch , you get to access its rich functionality directly from R, with no need to install, let alone learn, Python. Though still young as a project, torch already has a vibrant community of users and developers; the latter not just extending the core framework, but also, building on it in their own packages.
In this text, I'm attempting to attain three goals, corresponding to the book's three major sections.