Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Extend code documentation #2689

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions nntrainer/tensor/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,18 @@ namespace nntrainer {
class LazyTensor;

/**
* @class Tensor Class
* @brief Tensor Class
* @class Tensor Class
* @brief Tensor is a multidimensional matrix that contain elements of a single
* data type and can perform various operations like addition, division,
* multiplication, dot product, data averaging, and more.
* NNTrainer defines tensor types using different data types and memory formats.
* Supported data types and format are specified in the file 'tensor_dim.h'.
*
* @note The Tensor class utilizes the TensorBase class to support tensors with
* various data types. In other words, this tensor class serves as a container
* for tensors, and thus the functionality of the tensor should be defined in
* each tensor class (FloatTensor, HalfTensor, etc.).
*
*/
class Tensor {
public:
Expand Down
12 changes: 11 additions & 1 deletion nntrainer/tensor/tensor_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,17 @@ class SrcSharedTensorBase;

/**
* @class TensorBase class
* @brief TensorBase is an abstract class
* @brief TensorBase is an abstract class that provides a base for various
* tensor classes with different data types such as FloatTensor to extend and
* implement abstract methods.
*
* @note Basic functions required for tensor memory allocation and data
* modification, such as allocate(), getData(), and setValue(), are necessary
* when creating subclasses (new tensor class).
*
* The remaining operations that are used for mathematical operations are not
* essential to create a new tensor class but later should be implemented in a
* child class in order to utilize its tensor operations fully.
*/
class TensorBase {
public:
Expand Down
Loading