October 2, 2002Torch TutorialRonan CollobertIDIAP2Contents1 Introduction 52 Coding Guidelines 72.1 The core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 You said C++ ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 Naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Basic Types And Functions 93.1 The numeric real type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Matrices and vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 Writing message to the user . . . . . . . . . . . . . . . . . . . . . . . . . . 93.4 XFile: the Torch streams . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5 Basic classes: Object and Allocator . . . . . . . . . . . . . . . . . . . . . . 113.5.1 Input-output methods . . . . . . . . . . . . . . . . . . . . . . . . . 123.5.2 Option management . . . . . . . . . . . . . . . . . . . . . . . . . . 123.5.3 Memory management . . . . . . . . . . . . . . . . . . . . . . . . . 133.6 Random functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.7 Measuring time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.8 Taking arguments from the command-line . . . . . . . . . . . . . . . . . . 174 Main Concepts Of Torch 195 Data Management 215.1 Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.2 DataSet . . . . . . . . . . . . . . . ...