Releases: april-org/april-ann
Releases · april-org/april-ann
Revision 0.4.1
Unstable changes
- Improved serialize/deserialize functions, reimplemented all the serialization
procedure. - Added exceptions support to LuaPkg and APRIL-ANN, allowing to capture C++
errors into Lua code. - Added
setclass. - Added
seriesclass. - Added
data_frameclass, similar to Python Pandas DataFrame. - Serialization and deserilization have been updated with more robust and
reusable API, implemented inutil.serialize()andutil.deserialize()
functions. - Added
matrix.ext.broadcastutility (similar to broadcast in numpy). - Added
ProbablisitcMatrixANNComponent, which allow to implement probabilistic
mixtures of posteriors and/or likelihoods.
API Changes
- Added batch normalization ANN component.
- Allowing
matrix.jointo add new axis. - Added methods
prod(),cumsum()andcumprod()atmatrixclasses. - Added methods
count_eq()andcount_neq()atmatrixclasses. - Serializable objects API have been augmented with methods
ctor_name()and
ctor_params()in Lua, refered toluaCtorName()andluaCtorParams()in
C++. - Added
cast.toto dynamic cast C++ objects pushed into Lua, allowing to
convert base class objects into any of its derived classes. - Added
matrix.sparseas valid values for targets inann.loss.mseand
ann.loss.cross_entropy. - Changed
matrixmetamethods__indexand__newindex, allowing to use
matrixobjects with standard Luaoperator[]. - Added
matrix.masked_fillandmatrix.masked_copymatrix. - Added
matrix.indexed_fillandmatrix.indexed_copymatrix. - Added
ann.components.probabilistic_matrix, and its corresponding
specializationsann.components.left_probabilistic_matrixand
ann.components.right_probabilistic_matrix. - Added operator[] in the right side of matrix operations.
- Added
ann.components.transpose. - Added
max_gradients_normintraianble.supervised_trainer, to avoid
gradients exploding. - Added
ann.components.actf.sparse_logistica logistic activation function
with sparsity penalty. - Simplified
math.add,math.sub, ... and other math extensions for
reductions, their original behavior can be emulated by usingbindfunction. - Added
bindfunction to freeze any positional argument of any Lua function. - Function
stats.bootusesmultiple_unpackto allow a table of sizes and the
generation of multiple index matrices. - Added
multiple_unpackLua function. - Added
__tostringmetamethod to numeric memory blocks in Lua. - Added
dataset.token.sparse_matrix, a dataset which allow to traverse by rows
a sparse matrix instance. - Added
matrix.sparse.builders.dok, a builder which uses the
Dictionary-of-Keys format to construct a sparse matrix from scratch. - Added method
datato numeric matrix classes. - Added methods
values,indices,first_indexto sparse matrix class.
Bugs fixed
- Fixed bugs when reading bad formed CSV files.
- Fixed bugs at statistical distributions.
- FloatRGB bug solved on equal (+=, -=, ...) operators. This bug affected
ImageRGB operations such as resize. - Solved problems when chaining methods in Lua, some objects end to be garbage
collected. - Improved support of strings in auto-completion (rlcompleter package).
- Solved bug at
SparseMatrix<T>when reading it from a file. - Solved bug in
Image<T>::rotate90_cwmethods. - Solved bug in
SparseMatrix::toDense()method.
C/C++
- Better
LuaTableaccessors, using[]operator. - Implementation of matrix
__index,__newindexand__callmetamethods in
C++. - Implementation of
matProd(),matCumSum()andmatCumProd()functions. - Implementation of
matCountEq()andmatCountNeq()functions for
Matrix<T>. - Updated
matrix_ext_operations.hto change API of matrix operations. All
functions have been overloaded to accept an in-place operation and another
version which receives a destination matrix. - Adding iterators to language models.
- Added
MatrixScalarMap2which receives asinput2aSparaseMatrix
instance. This functions needs to be generalized to work with CPU and CUDA. - The method
SparseMatrix<T>::fromDenseMatrix()uses aDOKBuilderobject
to build the sparse matrix. - The conversion of a
Matrix<T>into aSparseMatrix<T>has been changed from
a constructor overload to the static method
SparseMatrix<T>::fromDenseMatrix().
Other
- Added support for IPyLua.
- Optimized matrix access for confusion matrix.
- Minor changes in
class.lua. - Improved binding to avoid multiple object copies when pushing C++ objects.
- Added Git commit hash and compilation time.
Release v0.4.0
Take into account that changes in the order of computations has introduced minor differences in optimizers of ANNs. In CNNs this difference is more important.
The most important changes are:
- Matrix classes doesn't have a major order flag. They are created always following row-major order, and it is possible to change this order by transposing dimensions of the original matrix. Math operations has been re-implemented asking for the order of the data, and working properly depending in that.
- Tokens are automatically unwrapped when they are pushed from C++ to Lua, and automatically wrapped when they are taken in C++ bindings. For this behavior, use the name
AuxTokenwhen using macrosLUABIND_GET_*orLUABIND_RETURN. - A
LuaTableclass has been added to allow a direct communication between C++ and Lua without replicating in C++ the data stored in Lua. It is useful for options tables, or to get dictionaries as weight matrix dictionaries of ANNs in trainable package.
Unstable changes
- Added
matrix.op.repmatfunction. - Added
matrix.ext.iterateiterator. - Added statistical distributions in
stats.dist. - Added
matrix.ext.convolutionandmatrix.ext.real_fftwh. - Added
Matrix<T>::convolutionmethod. It is in experimental stage, please,
be advice to use them by your own risk. - Because of the changes in
Image, several classes in packageimaginghas
been reviewed, consistent tests are necessary to merge with master branch.
API Changes
- Removed major order differentiation in
matrix. tokens.matrixautomatically wrapsmatrixinstances, from Lua to C++.matrixautomatically unwrapstokens.matrixinstances, from C++ to Lua.- Added new methods to
AprilMath::Limitsclass. - Added
metrics.rocfor ROC computation. - Added new
classbehavior taken from
Lua OOP-iter, in order to introduce
more modularity in APRIL-ANN. - New
april_docandapril_set_docAPI, works with values instead of strings. - Added
table.values,table.ivalues,table.keysandtable.ikeys
iterators. matrix.dictcould store sparse and dense float matrices.- Added
matrix.cholesky(...)method.
Bugs removed
- Solved bug at
matrix:max()andmatrix:min()methods. - Removed memory leak at
SelectANNComponent::doBackprop()method. - Solved bug at
CopyANNComponent::doBackprop()method, incorrect behavior for
multi-dimensional matrices. - Solved bug at
ZCAWhiteningANNComponent::doBackprop()method was wrong. - Solved bug in
stats.boot()function, it wasn't correctly updated to new
classfunctions. - Solve bug in
trainable.supervised_trainer, problem with smooth_gradients
flag. - Solved bug in trainable.lua
train_holdout:execute()method, the pocket
algorithm wasn't work with negative loss functions. - Solved bug at class.lua, inifite loop when calling
class.is_a(). - Solved bug at autoencoder training.
- Solved bug in ROC computation.
- CUDA is working, time performance of convolutions needs a review.
- Solved bug in
constStringextract numeric methods which returnsfalsewhen
the extraction procedure ends up to the character after the last valid number. - Solved bug at
Matrix<T>::divandSparseMatrix<T>::divmethods.
C/C++
- Added
LuaTableclass to allow access of Lua tables from C++ code. - Added TAR support in C/C++, allowing to use streams as the standard I/O
objects in APRIL-ANN. - Added
basicsnamespace which stores almost all C/C++ code inbasics
packages. - Simplified read/write of matrices using the new
StreamInterfaceobjects. - Added new
StreamInterfacefor input/output operations, with specializations
for C files, C strings, Lua strings, GZIP files, ZIP files. Other
specializations are easier to implement in the future. - Added statistical distribution classes.
- Removed C stack trace in ERROR_PRINT and ERROR_EXIT when compiling without
debug. Imageclass code has been reviewed to be more coherent with currentMatrix
class implementation.
Added Travis CI support and other new features
Unstable changes
- Added
clusteringandknnalgorithms. - Added
ann.components.zca_whiteningandann.components.pca_whitening
classes. - Added
stats.zca_whiteningandstats.pca_whiteningfunctions. - Added packages
autodiffandautodiff.ann, with automatic differentiation
algorithms. - Added
ann.optimizer.quickpropalgorithm, but stills untested. - Gradients smoothing, based on weights sharing and
bunch_size, is applied by
trainable.supervised_trainerobjects, not by theoptimizer. - Added
ann.components.dropoutclass. - Added
ann.autoencoders.aeclass, in order to factorize the SDAE code. - Solved problems with CUDA compilation, but it stills not working because
an error during cuMemAlloc. - Class interest_points and layout algorithms (still in development).
- Added the geometry c++ class for working in to lines and point geometry.
API Changes
- Modified bootstrapping API in order to be similar with R:
stats.boot()and
stats.boot.ci(). - Added
ann.optimizer.asgdfor Averaged SGD optimization. - Added
trainable.qlearning_trainerfor reinforcement learning tasks. - Enhanced
util.serializeandutil.deserializeto accept functions as
argument, allowing to serialize/deserialize over general streams. - Added
iscallable(...)function. - Added
utestpackage, for unit testing. - Added methods to
matrixwhich work with sparse matrices. - Added class
matrix.sparse. - Added method
m:toTabStream(file or gzfile)tomatrix. - Added operations
math.log1pandmath.logadd. - Added operator
%to Luastringmetatable, allowing to do Python-like
string formatting, and map-like substitutions. - Added index matrix for min/max operations in
matrixobjects. - Added
serializeanddeserializeLua functions, inutilpackage.
Bugs removed
- Solved bug which makes to load unitialized weight matrices when loading old
trainable.supervised_trainer (withoutmatrix.dictobject). - Solved bug at
Matrix<T>::sliding_windowwhich makes an early end of the
iterator when window has anoffsetdifferent of 0.
C/C++
- Added
-lcblasoption tobuild_release.luaandbuild_debug.lua. - Added sparse CBLAS wrappers, for CUDA (not tested) and standard release.
- Added CBLAS wrappers for float, double, and ComplexF types.
- Added geometric parametrizer for off-line text preprocessing.
- Added dependency with
liblapackefor PCA when not available MKL or MacOS X.
Other
- Added argument check at
mathcore.block.*constructors. - Travis is monitoring only master and devel branches, for push and
pull-requests. - Added travis compilation and testing platform for pull-requests.
April-ANN v0.3.1-alpha (pre-release of v0.3.1-beta)
API Changes
- Added
matrix:linspace(a,b)andmatrix:linspace(a,b,base). matrix:transpose()returns a matrix which references the original. Any
modification to the tranposed matrix, will be reflected at the original.matrix:cmulmethod is now in-place, so, if you don't want to modify the
original matrix, you need to dom:clone():cmul(...)instead of
m:cmul(...).updateproperty is added toann.optimizers.sgdobject in order to compute
the momentum.- Optimizers
executemethod receives a functions which computes the loss, the
gradient (mandatory). Any other data is optional. - Removed dropout code from activation functions.
- Deleted options from ANN components.
- Added methods
unrollandgettoann.components.stackclass. - Added
infandsuplimits to Hard-Tanh activation function. - Added
random:to_lua_string()method. - Moved
ann.loss.__base__toann.loss. - Moved
ann.components.actf.__base__toann.components.actf.
New features
- Added
matrix.dict, a hash set dictionary in C++ binded to Lua, which allows
to execute basic math operations and reductions over the whole set of
contained matrices. It major purpose is to represent a set of connection
weights or gradients in ANNs. - Added
dataset.token.filter, which allows ANN components as filters. - Added
trainable.train_holdout_validationclass, which replace
trainable.supervised_trainer:train_holdout_validationmethod. - Added
trainable.train_wo_validationclass, which replace
trainable.supervised_trainer:train_wo_validationmethod. - Added
trainable.dataset_pair_iteratorand
trainable.dataset_multiple_iterator, useful to iterate over datasets
following different traversal schemes: sequential, shuffled, shuffled with
replacement, shuffled with distribution. - Added method
precompute_output_sizein ANN components. - Added
ann.optimizer.cg, Conjugate Gradient algorithm. - Added
ann.optimizer.rprop, Resilient Prop algorithm. - Added
batch_fmeasure_micro_avgandbatch_fmeasure_macro_avgfor
multi-class FMeasure computation. - Renamed loss function
local_fmeasureasbatch_fmeasure, and improved to
work with multi-class models. - Added
ann.loss.zero_oneloss function. - Added
DEPENDENCIES-INSTALLER.sh. - Added syntactic sugar for
matrix:slice(...)method:m("1:2","3:4")or
m({1,2},{3,4}), like in Matlab or Octave. - Added
matrix.svdandmatrix.diagonalize. - Added
stats.pca,stats.mean_centered,stats.pca_whitening.
Bugs removed
- Memory leak due to the GPUMirroredMemoryBlock pool was solved.
- Solved bug at
stats.correlation.pearson. - Solved bug at
trainablewhen usinguse_dataset,train_dataset,
validate_dataset,grad_check_datasetmethods without abunch_size
parameter, and with a trainer which has not abunch_sizedefined at
construction. - Stabilization of log-logistic activation function.
- Stabilization of training with cross-entropy and multi-class-entropy.
- Solved bug when reading using
matrix.fromTabFilename. The loader failed
when the file had empty lines. - Solved bug at
Matrix<T>::select(...)C++ method. The matrix offset wasn't be
added to the resulting matrix offset. - Solved bug at
SlidingWindow::setAtWindow(...)C++ method. The matrix offset
wasn't be added to the computed window position. - Solved bug at
buffered_memory.h. Such bug introduces an early stop when
reading matrices, ignoring the last lines of files. - Solved problem with
rlcompleter, which didn't work properly when loaded as a
Lua module. - Modified
configure.shto inform about any error during Lua building. - Loadable modules are working on MacOs X.
C/C++ code changes
- Added
Matrix<T>::random_acces_iterator, which reduces the access overhead
for random access of aMatrixobject. It retains the memory pointer forcing
an update between host and device (GPU) memory. - Generalized
GPUMirroredBlockBaseto allow the reinterpretation of the
underlying memory pointer using different types (reinterpret_cast). - Added
MatrixSetclass template, which stores a dictionary of STRING->MATRIX,
useful for ANNs and gradient descent purposes. - Added
StochasticANNComponentwhich is base class for stochastic components. - Simplified coupling between ANN components, ANN loss functions, introducing
automatic binding between MatrixFloat and TokenMatrixFloat. - ANN Components has a pointer to a
MatrixFloatinstead ofANN::Connections. ANN::Connectionsis a static class with helper functions, and it is binded
asann.connections.- Old-weights property is removed from ANN connections.
- Added automatic conversion between DataSetFloat and DataSetToken in
dataset.token.filteranddataset.token.union. - Added
FunctionInterfaceclass, in Lua asfunctionsclass, superclass of
ANN components.
April-ANN v0.3.0-beta: deploying April-ANN as a Lua 5.2 module
The more important changes are:
- April-ANN could be loaded as a Lua 5.2 module.
- The ANNs learning algorithm has been splitted in two parts:
- The gradient computation, done in ANN components.
- The optimization procedure implemented in specific Lua objects.
- Some bugs and memory leaks has been solved.
API Changes
- Added
lossparameter totrainable.supervised_trainermethods. - Added
optimizerparameter totrainable.supervised_trainermethods. - Added
ann.optimizerpackage, which has the implementation of weight update
based on weight gradient. So, the ANN components only compute gradients.
This allows to implement different optimization methods (as "Conjugate
Gradient", or "Linear Search Brack-Propagation") with the same gradient
computation. - Loss functions
ann.lossAPI has been changed, now the loss computation is
done in two separated steps:
-matrix = loss:compute_loss(output,target): which returns a matrix with
the loss of every pair of patterns, allowing to perform several loss
computations without taken them into account.
-matrix = loss:accum_loss(matrix): which accumulates the loss in the
internal state of the class. - Added a new version of
lossfunction, which computes mean and
sample variance of the loss. Besides, the loss computation is done
with doubles, being more accurated than before. replacementparameter in SDAE doesn't forceon_the_flyparameter, they are
independent.- SDAE training has been changed in order to allow the use of LUA datasets,
- Replaced
cpp_class_binding_extensionbyclass_extensionfunction,
adding Lua classes support besides to CPP binded classes. - Modified
classandclass_instancefunctions to be more homogeneous
with C++ binding. - Added support for GZipped matrices load and save from C++, so functions
matrix.savefileandmatrix.loadfile(and its correspondence for complex
numbers, double, int32, and char) were removed. Methodsmatrix.fromFilename
andmatrix.toFilenameaccept '.gz' extension.
Packages rename
- Changed package
sdaetoann.autoencoders. - Changed package
loss_functionstoann.loss. - Splitted
mathcorepackage intomathcoreandcomplexpackages. - Renamed
mathpackage tomathcoreto avoid the collision with Lua standard
math library.
New features
- April-ANN is deployed as a standalone executable and as a shared library for
Lua 5.2. - Modified
lua.hto incorporate the GIT commit number in the disclaimer. - Added Lua autocompletion when readline is available.
- Implemented SignalHandler class in C++.
- Added
signal.registerandsignal.receivefunctions to Lua. - Added to
matrixthe methodsmap,contiguous,join,abs,tan,
atan,atanh,sinh,asin,asinh,cosh,acos,acosh,fromMMap,
toMMap,div,max,min. - Added
iteratorclass, which is a wrapper around Lua iterators, but
provides a more natural interface with functional programming procedures
asmap,filter,apply, orreduce. - Added methods
iterate,field,selectto iterator Lua class. table.insertreturns the table, which is useful for reduction operations.- Added
tablemethod toiteratorclass. - Added naive
L1_normregularization. - Added
dataset.clamp. - Added
mathcore.set_mmap_allocationfunction, which allows to forces the
use of mmap formatrixmemory allocation. - Added
ann.components.slice. - Added GS-PCA algorithm for efficient computation of PCA (iterative algorithm),
stats.iterative_pcaLua function. - Added basic MapReduce implementation in Lua.
- Added
stats.correlation.pearsonLua class. - Added
stats.bootstrap_resamplingfunction. - Added
math.add,math.sub,math.mul,math.divfunctions. trainableandann.mlp.all_allare usingmatrix:to_lua_string()
method.- Added method
to_lua_string()in all matrix types, so the method produce
a Lua chunk which is loadable and produce a matrix. - Added serialization to
parallel_foreach, allowing to produce outputs which
could be loaded by the caller process. - Declaration of
luatypefunction as global, it wasn't. - Added
iterable_mapandmultiple_ipairsfunctions to the Lua utilities. - Added SubAndDivNormalizationDataSet, applies a substraction and a division of
the feature vectors. - Added stepDataset.
Bugs removed
- Solved bug at
luabind_template.cc, which introduced spurious segmentation
faults due to Lua execution of garbage collection in the middle of a
lua_pushClassName. - Solved bug at glob function.
- Solved bug at matrix iterators operator=.
- Solved bug at method
matrix::best_span_iterator::setAtWindow. Becaose of It
the method didn't works when the matrix was a sub-matrix (slice) of other
matrix. - Solved bugs at Matrix template constructor which affects to
rewraplua
method, and to select method, which affects toselectlua method. - Added binarizer::init() to a binded static_constructor, it is needed to
execute init() before decode/encode double numbers, because of endianism. - Solved bug at constString when extracting double numbers in binary format.
- MacOS compilation problems solved.
- Solved problems with CUDA, it is working again.
- Dynamic loading of C modules is working now.
C/C++ code changes
- Added BIND_STRING_CONSTANT to luabind, so it is possible to export C string
constants to Lua. - Removed warning of clang about unused variables, adding a new macro
UNUSED_VARIABLE(x)defined in the headerutils/c_src/unused_variable.h. - Matrix fromString and toString Lua methods have been improved to write/read
directly from Lua string buffer, so the memory print has been reduced. - The C++ routines to write and read files is generalized to work with streams,
under the BufferedStream template, and it is instantiated to FILE and gzFile
formats. - Added sanity check to cross-entropy and multi-class cross-entropy loss
functions, to detect the use of non logarithmic outputs.
Updated with lua-5.2.2
This release compiles with Lua 5.2.2, instead of 5.1.4. It the following new features:
- matrices with float (matrix), complex numbers (matrixComplex), double (matrixDouble), and int32 (matrixInt32).
- GZIO is fresh code, a wrapper over ZLIB, binded using LUABIND.
- Added LAPACK support, for matrix inversion computation.
- Updated Lua class mean_var to follow the method of Knuth.
- CUDA compiles, but stills not working :SSSSSS
- Solved problems of table.tostring.
- Generalization of matrix math operators.
- Specialization of math wrappers for float and complex numbers.
- Support for MAT-file format (Matlab matrices).
- Added mutual_information package.
- Added APRIL_EXEC and APRIL_TOOLS_DIR environment variables to configure.sh
- Added scripts for NBEST, but not working :SSSSSS
- Some memory leaks, and bugs are solved.