NAME
SPVM::AI::Util - AI Utilities for array operations, matrix operations, activate function, and cost function etc.
VERSION
Version 0.01
SYNOPSIS
Quick summary of what the module does.
Perhaps a little code snippet.
use SPVM::AI::Util;
my $mat1 = SPVM::AI::Util->mat_newf([1.2f, 1.3, 1.4], 3, 2);
my $mat2 = SPVM::AI::Util->mat_newf([1.5f, 1.1, 1.2], 3, 2);
my $mat_add = SPVM::AI::Util->mat_addf($mat1, $mat2);
DESCRIPTION
SPVM::AI::Util is AI Utilities for array operations, matrix operations, activate function, and cost function etc.
This is SPVM module. You can write programing logic using SPVM Language or binding C/C++/cuda language.
STATIC METHODS
mat_newf
sub mat_newf : SPVM::AI::Util::FloatMatrix ($values : float[], $rows_length: int, $columns_length : int)
Create new SPVM::AI::Util::FloatMatrix object.
Arguments:
1. Values. this value is set to values
field. Note that the reference is set to values
field not creating new array which elements is copied from argument array. Elements order is assumed as Column-Major order.
2. Row. This value is set to rows_length
field.
3. Column. This value is set to columns_length
field.
Return Value:
SPVM::AI::Util::FloatMatrix object.
Exception:
1. If Values is not defined, a exception occurs.
2. If Values length is different from Row * Column, a exception occurs.
mat_new_zerof
sub mat_new_zerof : SPVM::AI::Util::FloatMatrix ($rows_length: int, $columns_length : int)
Create new SPVM::AI::Util::FloatMatrix object with zero value.
mat_new_identf
sub mat_new_identf : SPVM::AI::Util::FloatMatrix ($dim : int)
Create new ident <SPVM::AI::Util::FloatMatrix> by specifing the dimention.
mat_transposef
sub mat_transposef : SPVM::AI::Util::FloatMatrix ($mat : SPVM::AI::Util::FloatMatrix)
Transpose float matrix and return new SPVM::AI::Util::FloatMatrix object.
mat_addf
sub mat_addf : SPVM::AI::Util::FloatMatrix ($mat1 : SPVM::AI::Util::FloatMatrix, $mat2 : SPVM::AI::Util::FloatMatrix)
Add two float Matrix and return new SPVM::AI::Util::FloatMatrix object.
mat_subf
sub mat_subf : SPVM::AI::Util::FloatMatrix ($mat1 : SPVM::AI::Util::FloatMatrix, $mat2 : SPVM::AI::Util::FloatMatrix)
Subtract two float Matrix and return new SPVM::AI::Util::FloatMatrix object.
mat_scamulf
sub mat_scamulf : SPVM::AI::Util::FloatMatrix ($scalar : float, $mat1 : SPVM::AI::Util::FloatMatrix)
Scalar multiply float matrix and return new SPVM::AI::Util::FloatMatrix object.
mat_mulf
sub mat_mulf : SPVM::AI::Util::FloatMatrix ($mat1 : SPVM::AI::Util::FloatMatrix, $mat2 : SPVM::AI::Util::FloatMatrix)
Multiply two float Matrix and return new SPVM::AI::Util::FloatMatrix object.
mat_strf
sub mat_strf : string ($mat : SPVM::AI::Util::FloatMatrix)
Convert Matrix Content to String. Each column is joined 1 space and Each row is end with \n
1 3 5 2 4 6
LICENSE AND COPYRIGHT
This software is Copyright (c) 2020 by Yuki Kimoto.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
AUTHOR
Yuki Kimoto, <kimoto.yuki at gmail.com>
BUGS
Please report any bugs or feature requests to bug-spvm-ai-util at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=SPVM-AI-Util. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc SPVM::AI::Util
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN