forked from torch/torch7
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
3,638 additions
and
3,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<a name="torch.reference.dok"/> | ||
# Torch Package Reference Manual # | ||
|
||
__Torch__ is the main package in [Torch7](http://torch.ch) where data | ||
structures for multi-dimensional tensors and mathematical operations | ||
over these are defined. Additionally, it provides many utilities for | ||
accessing files, serializing objects of arbitrary types and other | ||
useful utilities. | ||
|
||
<a name="torch.reference.dok"/> | ||
## Torch Packages ## | ||
|
||
* Tensor Library | ||
* [Tensor](doc/tensor.md) defines the _all powerful_ tensor object that provides multi-dimensional numerical arrays with type templating. | ||
* [Mathematical operations](doc/maths.md) that are defined for the tensor object types. | ||
* [Storage](doc/storage.md) defines a simple storage interface that controls the underlying storage for any tensor object. | ||
* File I/O Interface Library | ||
* [File](doc/file.md) is an abstract interface for common file operations. | ||
* [Disk File](doc/diskfile.md) defines operations on files stored on disk. | ||
* [Memory File](doc/memoryfile.md) defines operations on stored in RAM. | ||
* [Pipe File](doc/pipefile.md) defines operations for using piped commands. | ||
* [High-Level File operations](doc/serialization.md) defines higher-level serialization functions. | ||
* Useful Utilities | ||
* [Timer](doc/timer.md) provides functionality for _measuring time_. | ||
* [Tester](doc/tester.md) is a generic tester framework. | ||
* [CmdLine](doc/cmdline.md) is a command line argument parsing utility. | ||
* [Random](doc/random.md) defines a random number generator package with various distributions. | ||
* Finally useful [utility](doc/utility.md) functions are provided for easy handling of torch tensor types and class inheritance. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<a name="torch.DiskFile.dok"/> | ||
# DiskFile # | ||
|
||
Parent classes: [File](file.md) | ||
|
||
A `DiskFile` is a particular `File` which is able to perform basic read/write operations | ||
on a file stored on disk. It implements all methods described in [File](file.md), and | ||
some additional methods relative to _endian_ encoding. | ||
|
||
By default, a `DiskFile` is in [ASCII](file.md#torch.File.binary) mode. If changed to | ||
the [binary](file.md#torch.File.binary) mode, the default endian encoding is the native | ||
computer one. | ||
|
||
The file might be open in read, write, or read-write mode, depending on the parameter | ||
`mode` (which can take the value `"r"`, `"w"` or `"rw"` respectively) | ||
given to the [torch.DiskFile(fileName, mode)](#torch.DiskFile). | ||
|
||
<a name="torch.DiskFile"/> | ||
### torch.DiskFile(fileName, [mode], [quiet]) ### | ||
|
||
_Constructor_ which opens `fileName` on disk, using the given `mode`. Valid `mode` are | ||
`"r"` (read), `"w"` (write) or `"rw"` (read-write). Default is read mode. | ||
|
||
If read-write mode, the file _will be created_ if it does not exists. If it | ||
exists, it will be positionned at the beginning of the file after opening. | ||
|
||
If (and only if) `quiet` is `true`, no error will be raised in case of | ||
problem opening the file: instead `nil` will be returned. | ||
|
||
The file is opened in [ASCII](file.md#torch.File.ascii) mode by default. | ||
|
||
<a name="torch.DiskFile.bigEndianEncoding"/> | ||
### bigEndianEncoding() ### | ||
|
||
In [binary](file.md#torch.File.binary) mode, force encoding in _big endian_. | ||
(_big end first_: decreasing numeric significance with increasing memory | ||
addresses) | ||
|
||
<a name="torch.DiskFile.isBigEndianCPU"/> | ||
### [boolean] isBigEndianCPU() ### | ||
|
||
Returns `true` if, and only if, the computer CPU operates in _big endian_. | ||
_Big end first_: decreasing numeric significance with increasing | ||
memory addresses. | ||
|
||
<a name="torch.DiskFile.isLittleEndianCPU"/> | ||
### [boolean] isLittleEndianCPU() ### | ||
|
||
Returns `true` if, and only if, the computer CPU operates in _little endian_. | ||
_Little end first_: increasing numeric significance with increasing | ||
memory addresses. | ||
|
||
<a name="torch.DiskFile.littleEndianEncoding"/> | ||
### littleEndianEncoding() ### | ||
|
||
In [binary](file.md#torch.File.binary) mode, force encoding in _little endian_. | ||
(_little end first_: increasing numeric significance with increasing memory | ||
addresses) | ||
|
||
<a name="torch.DiskFile.nativeEndianEncoding"/> | ||
### nativeEndianEncoding() ### | ||
|
||
In [binary](file.md#torch.File.binary) mode, force encoding in _native endian_. | ||
|
||
|
Oops, something went wrong.