--- torch3-3.1.orig/Makefile +++ torch3-3.1/Makefile @@ -1,35 +1,41 @@ -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell pwd) -include Makefile_options_$(OS) +include $(CURDIR)/Makefile_options_$(OS) SUBDIRS := core SUBDIRS += $(PACKAGES) all: @echo ">>> Try to compile Torch <<<" - @for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@) || exit 10 ; done + #for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@ ) || exit 10 ; done + for subdir in ${SUBDIRS} ; do ( ${MAKE} -C ${CURDIR}/$$subdir -f ../Makefile.modules $@ ) || exit 10 ; done @echo ">> !!! Ok !!! <<<" clean: @echo ">>> Atomise all <<<" - @for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@ ) || exit 10 ; done - @\rm -Rf $(LIBTORCHXX) - @\rm -Rf $(OBJS_DIR) - @\rm -Rf $(LIBS_DIR) + #for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@ ) || exit 10 ; done + @echo ">>> Thermonuclearise all <<<" + for subdir in ${SUBDIRS} ; do ( ${MAKE} -C ${CURDIR}/$$subdir -f ../Makefile.modules $@ ) || exit 10 ; done + rm -Rf $(LIBTORCHXX) + rm -Rf $(OBJS_DIR) + rm -Rf $(LIBS_DIR) @echo ">> !!! Ok !!! <<<" distclean: @echo ">>> Thermonuclearise all <<<" - @for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@ ) || exit 10 ; done - @\rm -Rf lib - @\rm -Rf objs + #for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@ ) || exit 10 ; done + for subdir in ${SUBDIRS} ; do ( ${MAKE} -C ${CURDIR}/$$subdir -f ../Makefile.modules $@ ) || exit 10 ; done + rm -Rf lib + rm -Rf objs @echo ">> !!! Ok !!! <<<" depend: @echo ">>> Dependencies <<<" - @for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@ ) || exit 10 ; done - @\mkdir -p $(OBJS_DIR) - @\mkdir -p $(LIBS_DIR) + #for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@ ) || exit 10 ; done + for subdir in ${SUBDIRS} ; do ( ${MAKE} -C ${CURDIR}/$$subdir -f ${CURDIR}/Makefile.modules $@ ) || exit 10 ; done + mkdir -p $(OBJS_DIR)/static + mkdir -p $(OBJS_DIR)/dynamic + mkdir -p $(LIBS_DIR) @echo ">> !!! Ok !!! <<<" Makefile_options_$(OS): --- torch3-3.1.orig/Makefile.modules +++ torch3-3.1/Makefile.modules @@ -0,0 +1,55 @@ +# get user and architecture specific options +OS := $(shell uname -s | tr '/' '_') +TORCHDIR := $(shell cd ..; pwd) +include ../Makefile_options_$(OS) + +CC_FILES := $(wildcard *.cc) +STATICOBJSDIR := $(OBJS_DIR)/static +STATICOBJS := $(foreach f,$(CC_FILES),$(OBJS_DIR)/static/$(patsubst %.cc,%.o,$(f))) +DYNAMICOBJS := $(foreach f,$(CC_FILES),$(OBJS_DIR)/dynamic/$(patsubst %.cc,%.o,$(f))) +DYNAMICOBJSDIR := $(OBJS_DIR)/dynamic + +all: $(LIBTORCH) $(LIBSOTORCH) +soname: $(LIBSOTORCH) + +$(LIBTORCH): $(STATICOBJS) + @echo "Archiving..." + $(AR) $(LIBTORCH) $(STATICOBJSDIR)/*.o +$(LIBSOTORCH): $(DYNAMICOBJS) + $(CC) -shared -Wl,-soname=libtorch.so.3 -o $(LIBSOTORCH) $(DYNAMICOBJSDIR)/*.o + + +$(OBJS_DIR)/static/%.o: %.cc + @echo $< + $(CC) $(CFLAGS_$(MODE)) $(INCS) -o $@ -c $< +$(OBJS_DIR)/dynamic/%.o: %.cc + @echo $< + $(CC) -fPIC $(CFLAGS_$(MODE)) $(INCS) -o $@ -c $< + +distclean: + rm -f .deps_* + +clean: + @echo "Remove objects file and dependencies..." + rm -Rf $(OBJS) $(LIBTORCH) + rm -f .deps_$(VERSION_KEY) + rm -f *.class + +depend: + @echo "Tracking dependencies..." + rm -f .deps_$(VERSION_KEY) + echo ${CURDIR} + echo *.cc + for file in *.cc ; do printf "$(OBJS_DIR)/" >> .deps_$(VERSION_KEY); $(DEP) $(CFLAGS_$(MODE)) $(INCS) $$file >> .deps_$(VERSION_KEY); done + +.deps_$(VERSION_KEY): + @echo ">>> Please do a 'make depend' <<<" + exit 10 + +ifneq ($(MAKECMDGOALS),distclean) +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),depend) +include .deps_$(VERSION_KEY) +endif +endif +endif --- torch3-3.1.orig/Makefile_options_GNU +++ torch3-3.1/Makefile_options_GNU @@ -0,0 +1,73 @@ +# +# What you have to check... +# + +# Packages you want to use +PACKAGES = convolutions datasets decoder distributions gradients kernels matrix nonparametrics speech +#PACKAGES = + +# Magik key if you have several makefile +# for the same platform +MAGIK_KEY = + +# Compiler, linker and archiver +CC = g++ +CXX = g++ +LD = $(CC) +AR = ar -rus + +# Command for creating dependencies +DEP = $(CC) -MM + +# Your librairies +# (for example "-lm", but not needed on most systems...) +MYLIBS = + +# Your includes +# (for example -I/usr/local/special) +MYINCS = + +# optimize mode +DEBUG = OPT +# debug mode +#DEBUG = DBG + +# double version +#FLOATING = DOUBLE +# floating version +FLOATING = FLOAT + +# Debug double mode +CFLAGS_DBG_DOUBLE = -g -Wall -DUSE_DOUBLE -DDEBUG + +# Debug float mode +CFLAGS_DBG_FLOAT = -g -Wall -DDEBUG + +# Optimized double mode +#CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double -DUSE_DOUBLE +CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -DUSE_DOUBLE + +# Optimized float mode +#CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double +CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math + +# +# +# Variables that you may find useful inside your Makefile +# Do not touch. +# +# + +MODE = $(DEBUG)_$(FLOATING) +VERSION_KEY = $(MAGIK_KEY)$(OS)_$(MODE) +#LIBS_DIR = $(TORCHDIR)/lib/$(VERSION_KEY) +# Modified by KA for Debian +LIBS_DIR = $(TORCHDIR)/lib/ +#OBJS_DIR = $(TORCHDIR)/objs/$(VERSION_KEY) +# Modified by KA for Debian +OBJS_DIR = $(TORCHDIR)/objs/ +LIBTORCH = $(LIBS_DIR)/libtorch.a +LIBSOTORCH = $(LIBS_DIR)/libtorch.so.3.0.0 +LIBS = -L$(TORCHDIR)/lib/ $(LIBTORCH) $(MYLIBS) +INCS := -I$(TORCHDIR)/core $(MYINCS) +INCS += $(foreach f,$(PACKAGES),-I$(TORCHDIR)/$(f)) --- torch3-3.1.orig/Makefile_options_GNU_kFreeBSD +++ torch3-3.1/Makefile_options_GNU_kFreeBSD @@ -0,0 +1,75 @@ +# +# What you have to check... +# + +# Packages you want to use +PACKAGES = convolutions datasets decoder distributions gradients kernels matrix nonparametrics speech +#PACKAGES = + +# Magik key if you have several makefile +# for the same platform +MAGIK_KEY = + +# Compiler, linker and archiver +CC = g++ +CXX = g++ +LD = $(CC) +AR = ar -rus + +# Command for creating dependencies +DEP = $(CC) -MM + +# Your librairies +# (for example "-lm", but not needed on most systems...) +MYLIBS = + +# Your includes +# (for example -I/usr/local/special) +MYINCS = + +# optimize mode +DEBUG = OPT +# debug mode +#DEBUG = DBG + +# double version +#FLOATING = DOUBLE +# floating version +FLOATING = FLOAT + +# Debug double mode +CFLAGS_DBG_DOUBLE = -g -Wall -DUSE_DOUBLE -DDEBUG + +# Debug float mode +CFLAGS_DBG_FLOAT = -g -Wall -DDEBUG + +# Optimized double mode +#CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double -DUSE_DOUBLE +CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -DUSE_DOUBLE + +# Optimized float mode +#CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double +CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math + +# +# +# Variables that you may find useful inside your Makefile +# Do not touch. +# +# + +MODE = $(DEBUG)_$(FLOATING) +VERSION_KEY = $(MAGIK_KEY)$(OS)_$(MODE) +#LIBS_DIR = $(TORCHDIR)/lib/$(VERSION_KEY) +# Modified by KA for Debian +LIBS_DIR = $(TORCHDIR)/lib/ +#OBJS_DIR = $(TORCHDIR)/objs/$(VERSION_KEY) +# Modified by KA for Debian +OBJS_DIR = $(TORCHDIR)/objs/ +LIBTORCH = $(LIBS_DIR)/libtorch.a +#LIBSOTORCH = $(LIBS_DIR)/libtorch.so +LIBSOTORCH = $(LIBS_DIR)/libtorch.so.3.0.0 +#LIBS = -L$(TORCHDIR)/lib/$(VERSION_KEY) $(LIBTORCH) $(MYLIBS) +LIBS = -L$(TORCHDIR)/lib/ $(LIBTORCH) $(MYLIBS) +INCS := -I$(TORCHDIR)/core $(MYINCS) +INCS += $(foreach f,$(PACKAGES),-I$(TORCHDIR)/$(f)) --- torch3-3.1.orig/Makefile_options_Linux +++ torch3-3.1/Makefile_options_Linux @@ -0,0 +1,75 @@ +# +# What you have to check... +# + +# Packages you want to use +PACKAGES = convolutions datasets decoder distributions gradients kernels matrix nonparametrics speech +#PACKAGES = + +# Magik key if you have several makefile +# for the same platform +MAGIK_KEY = + +# Compiler, linker and archiver +CC = g++ +CXX = g++ +LD = $(CC) +AR = ar -rus + +# Command for creating dependencies +DEP = $(CC) -MM + +# Your librairies +# (for example "-lm", but not needed on most systems...) +MYLIBS = + +# Your includes +# (for example -I/usr/local/special) +MYINCS = + +# optimize mode +DEBUG = OPT +# debug mode +#DEBUG = DBG + +# double version +#FLOATING = DOUBLE +# floating version +FLOATING = FLOAT + +# Debug double mode +CFLAGS_DBG_DOUBLE = -g -Wall -DUSE_DOUBLE -DDEBUG + +# Debug float mode +CFLAGS_DBG_FLOAT = -g -Wall -DDEBUG + +# Optimized double mode +#CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double -DUSE_DOUBLE +CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -DUSE_DOUBLE + +# Optimized float mode +#CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double +CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math + +# +# +# Variables that you may find useful inside your Makefile +# Do not touch. +# +# + +MODE = $(DEBUG)_$(FLOATING) +VERSION_KEY = $(MAGIK_KEY)$(OS)_$(MODE) +#LIBS_DIR = $(TORCHDIR)/lib/$(VERSION_KEY) +# Modified by KA for Debian +LIBS_DIR = $(TORCHDIR)/lib/ +#OBJS_DIR = $(TORCHDIR)/objs/$(VERSION_KEY) +# Modified by KA for Debian +OBJS_DIR = $(TORCHDIR)/objs/ +LIBTORCH = $(LIBS_DIR)/libtorch.a +#LIBSOTORCH = $(LIBS_DIR)/libtorch.so +LIBSOTORCH = $(LIBS_DIR)/libtorch.so.3.0.0 +#LIBS = -L$(TORCHDIR)/lib/$(VERSION_KEY) $(LIBTORCH) $(MYLIBS) +LIBS = -L$(TORCHDIR)/lib/ $(LIBTORCH) $(MYLIBS) +INCS := -I$(TORCHDIR)/core $(MYINCS) +INCS += $(foreach f,$(PACKAGES),-I$(TORCHDIR)/$(f)) --- torch3-3.1.orig/config/Makefile +++ torch3-3.1/config/Makefile @@ -11,7 +11,7 @@ # All that follows you can probably keep as is... # -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') include $(TORCHDIR)/Makefile_options_$(OS) %: %.cc --- torch3-3.1.orig/convolutions/Makefile +++ torch3-3.1/convolutions/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/core/Makefile +++ torch3-3.1/core/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/core/general.cc +++ torch3-3.1/core/general.cc @@ -37,8 +37,8 @@ va_list args; va_start(args,msg); vsprintf(xxpetit_message_pour_melanie, msg, args); - printf("\n$ Error: %s\n\n", xxpetit_message_pour_melanie); - fflush(stdout); + fprintf(stderr, "\n$ Error: %s\n\n", xxpetit_message_pour_melanie); + fflush(stderr); va_end(args); exit(-1); } @@ -48,8 +48,8 @@ va_list args; va_start(args,msg); vsprintf(xxpetit_message_pour_melanie, msg, args); - printf("! Warning: %s\n", xxpetit_message_pour_melanie); - fflush(stdout); + fprintf(stderr, "! Warning: %s\n", xxpetit_message_pour_melanie); + fflush(stderr); va_end(args); } @@ -58,7 +58,7 @@ va_list args; va_start(args,msg); vsprintf(xxpetit_message_pour_melanie, msg, args); - printf("# %s\n", xxpetit_message_pour_melanie); + fprintf(stdout, "# %s\n", xxpetit_message_pour_melanie); fflush(stdout); va_end(args); } @@ -68,7 +68,7 @@ va_list args; va_start(args,msg); vsprintf(xxpetit_message_pour_melanie, msg, args); - printf("%s", xxpetit_message_pour_melanie); + fprintf(stdout, "%s", xxpetit_message_pour_melanie); fflush(stdout); va_end(args); } --- torch3-3.1.orig/datasets/Makefile +++ torch3-3.1/datasets/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/debian/README.Debian +++ torch3-3.1/debian/README.Debian @@ -0,0 +1,33 @@ +torch3 for Debian +----------------- + +This is the Torch 3 library. + + +- Upstream do not release any rule to generate dynamic libraries, so + I've do my own Makefile rules to compile them. + +$ objdump -x /usr/lib/libtorch.so.3.0.0 | grep SONAME + SONAME libtorch.so.3 + + For this reason, if you make a Debian package linked against + libtorch3, email me please. I need to know it, and keep in mind you + are not using a dynamic library model by upstream (anyway, I've + emailed upstream and notified that). + + +- For the above reason I've substantially modified Makefile's making + model. Now Makefile.modules is used to compile every Torch's module, + instead of using one for each dir. + It is responsable to make dynlib too. + + +- In the -dev package you can find some examples. Copy directory in a + writable place and build examples with makefile you'll find in the + examples' root dir. ie: + $ make decoder/tode + +- Some patches have been applied to upstream's tarball, you can find it + in patches/. + + -- Cosimo Alfarano , Thu, 21 Aug 2003 14:50:28 +0200 --- torch3-3.1.orig/debian/c +++ torch3-3.1/debian/c @@ -0,0 +1,24 @@ +This package was debianized by Cosimo Alfarano +on Sun, 25 Jun 2000 17:52:35 +0200. + + +It was downloaded from http://www.torch.ch/downloads.php + +Upstream Authors: + + Ronan Collobert + Samy Bengio + Johnny Mariéthoz + +Copyright: + + Copyright (C) 2003-2004 Ronan Collobert + Copyright (C) 2003-2004 Samy Bengio + Copyright (C) 2003-2004 Johnny Mariéthoz + +License: + + Torch3 is under BSD Licence, see /usr/share/common-licenses/BSD + +The Debian packaging is (C) 2000-2008, Cosimo Alfarano and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- torch3-3.1.orig/debian/changelog +++ torch3-3.1/debian/changelog @@ -0,0 +1,120 @@ +torch3 (3.1-2.2) unstable; urgency=medium + + * Non-maintainer upload. + * Switch to debhelper compat level 10 (Closes: #817698). + * Create an explicit debian/source/format. + + -- Andrey Rahmatullin Thu, 24 Nov 2016 23:44:57 +0500 + +torch3 (3.1-2.1) unstable; urgency=low + + * Non maintainer upload. + * Remove dependency on libstdc++6-4.1-dev. Closes: #595923. + * Fix build failure on the GNU/Hurd (Barry deFreese). Closes: #534223. + + -- Matthias Klose Wed, 08 Sep 2010 21:04:24 +0200 + +torch3 (3.1-2) unstable; urgency=low + + * updated confusing changelog entry (closes: #319139) + * updated to standard version 3.8.0 + * lintian cleaned + + -- Cosimo Alfarano Tue, 08 Jul 2008 10:45:13 -0400 + +torch3 (3.1-1.2) unstable; urgency=low + + * Porter NMU. + * Added support for GNU/kFreeBSD (closes: #345235). + * Fix the indentation of the description (closes: #371833). + + -- Aurelien Jarno Sun, 10 Dec 2006 22:29:26 +0100 + +torch3 (3.1-1.1) unstable; urgency=high + + * NMU. + * libtorch3-dev: Fix libstdc++-dev debpendency. + + -- Matthias Klose Mon, 4 Sep 2006 02:16:21 +0200 + +torch3 (3.1-1) unstable; urgency=low + + * Updated packagename and Co. for GCC 4.0 transition + + -- Cosimo Alfarano Wed, 13 Jul 2005 21:14:32 +0200 + +torch3 (3.1-0) unstable; urgency=low + + * New release from Upstream + closes:#276723 + * Packages version updated to the upstream's one + (thanks to Barak for remembering me it) + * I've decided to use the old (debian-modified) makefile method, for the + moment. There is no real reason, now, to use their xmake python script + + -- Cosimo Alfarano Fri, 29 Oct 2004 11:47:52 +0200 + +torch3 (0.0-7) unstable; urgency=low + + * semi applied a non upstream patch by Alexander Kogan (thanks) for + core/general.cc + error() and warning() are OK for stderr using, but message() and print() + are not: they are intended for stdout outputs, if it's annoying it's only + because they're misused. + + -- Cosimo Alfarano Tue, 8 Jun 2004 18:19:56 +0200 + +torch3 (0.0-6) unstable; urgency=low + + * removing g++ from build depends, it's in build-essential + * libtorch3-dev: changed deps on libstdc++5-dev to libstdc++5-3.3-dev + closes: Bug#249976 + reason: g++ (3.3) is in build-essential, so libtorch3-dev cannot depend on + something depending on g++-3.2 + * changing error() from using printf(...) to using fprintf(stdrr...) + closes: Bug#251033 + some printf are still around, I'm waiting for a patch from the bug + submitter. + + -- Cosimo Alfarano Thu, 27 May 2004 18:52:59 -0300 + +torch3 (0.0-5) unstable; urgency=low + + * Standards-Version updated to 3.6.1 + + -- Cosimo Alfarano Sun, 1 Feb 2004 12:27:36 +0100 + +torch3 (0.0-4) unstable; urgency=low + + * removed any explicit reference to g++-3.2 using g++ instead + * dh_compress now do not compresses C++ sources (*.cc) anymore, so examples/ + can be compiled without decompression + + -- Cosimo Alfarano Tue, 6 Jan 2004 14:17:14 +0100 + +torch3 (0.0-3) unstable; urgency=low + + * Rebuild with debuild -sa to include orig file in .changes + closes: #222150 + + -- Cosimo Alfarano Fri, 28 Nov 2003 00:01:08 +0100 + +torch3 (0.0-2.1) unstable; urgency=low + + * Remove 'Conflicts: libtorch3' from libtorch3 control entry, useless. + + -- Cosimo Alfarano Thu, 13 Nov 2003 10:17:06 +0100 + +torch3 (0.0-2) unstable; urgency=low + + * First Debian Release + closes: Bug#217648 + + -- Cosimo Alfarano Tue, 4 Nov 2003 13:53:23 +0100 + +torch3 (0.0-1) unstable; urgency=low + + * Initial Release. + + -- Cosimo Alfarano Thu, 21 Aug 2003 14:50:28 +0200 + --- torch3-3.1.orig/debian/compat +++ torch3-3.1/debian/compat @@ -0,0 +1 @@ +10 --- torch3-3.1.orig/debian/control +++ torch3-3.1/debian/control @@ -0,0 +1,56 @@ +Source: torch3 +Section: libs +Priority: optional +Maintainer: Cosimo Alfarano +Build-Depends: debhelper (>= 10) +Standards-Version: 3.8.0 + +Package: libtorch3c2 +Section: libs +Architecture: any +Depends: ${shlibs:Depends} ${misc:Depends} +Provides: libtorch +Conflicts: libtorch3 +Description: State of the art machine learning library - runtime library + Torch is a machine-learning library, written in C++. Its aim is to + provide the state-of-the-art of the best algorithms for + machine-learning. + . + * Many gradient-based methods, including multi-layered perceptrons, + radial basis functions, and mixtures of experts. Many small "modules" + (Linear module, Tanh module, SoftMax module, ...) can be plugged + together. + * Support Vector Machine, for classification and regression. + * Distribution package, includes Kmeans, Gaussian Mixture Models, + Hidden Markov Models, and Bayes Classifier, and classes for speech + recognition with embedded training. + * Ensemble models such as Bagging and Adaboost. + * Non-parametric models such as K-nearest-neighbors, Parzen Regression + and Parzen Density Estimator. + . + This package is the Torch runtime library. + +Package: libtorch3-dev +Section: devel +Architecture: any +Depends: libtorch3c2 (= ${binary:Version}) +Provides: libtorch-dev +Conflicts: libtorch1-dev, libtorch-dev +Description: State of the art machine learning library - development files + Torch is a machine-learning library, written in C++. Its aim is to + provide the state-of-the-art of the best algorithms. + . + * Many gradient-based methods, including multi-layered perceptrons, + radial basis functions, and mixtures of experts. Many small "modules" + (Linear module, Tanh module, SoftMax module, ...) can be plugged + together. + * Support Vector Machine, for classification and regression. + * Distribution package, includes Kmeans, Gaussian Mixture Models, + Hidden Markov Models, and Bayes Classifier, and classes for speech + recognition with embedded training. + * Ensemble models such as Bagging and Adaboost. + * Non-parametric models such as K-nearest-neighbors, Parzen Regression + and Parzen Density Estimator. + . + This package is the Torch development package (header files and + static library.) --- torch3-3.1.orig/debian/copyright +++ torch3-3.1/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Cosimo Alfarano +on Sun, 25 Jun 2000 17:52:35 +0200. + + +It was downloaded from http://www.torch.ch/downloads.php + +Upstream Authors: + + Ronan Collobert + Samy Bengio + Johnny Mariéthoz + +Copyright: + + Copyright (C) 2003-2004 Ronan Collobert + Copyright (C) 2003-2004 Samy Bengio + Copyright (C) 2003-2004 Johnny Mariéthoz + +License: + + Torch3 is under BSD Licence, see /usr/share/common-licenses/BSD + +The Debian packaging is (C) 2000-2008, Cosimo Alfarano and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- torch3-3.1.orig/debian/libtorch3-dev.dirs +++ torch3-3.1/debian/libtorch3-dev.dirs @@ -0,0 +1,3 @@ +usr/lib +usr/include +usr/include/torch --- torch3-3.1.orig/debian/libtorch3-dev.examples +++ torch3-3.1/debian/libtorch3-dev.examples @@ -0,0 +1 @@ +examples/* --- torch3-3.1.orig/debian/libtorch3-dev.files +++ torch3-3.1/debian/libtorch3-dev.files @@ -0,0 +1,5 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/pkgconfig/* +/usr/lib/*.la --- torch3-3.1.orig/debian/libtorch3c2.dirs +++ torch3-3.1/debian/libtorch3c2.dirs @@ -0,0 +1 @@ +usr/lib --- torch3-3.1.orig/debian/libtorch3c2.files +++ torch3-3.1/debian/libtorch3c2.files @@ -0,0 +1 @@ +usr/lib/lib*.so.* --- torch3-3.1.orig/debian/patches/examples_includes.diff +++ torch3-3.1/debian/patches/examples_includes.diff @@ -0,0 +1,475 @@ +diff -Nur examples.orig/decoder/tode.cc examples/decoder/tode.cc +--- examples.orig/decoder/tode.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/decoder/tode.cc 2004-10-29 12:03:34.000000000 +0200 +@@ -1,13 +1,13 @@ +-#include "LinearLexicon.h" +-#include "LanguageModel.h" +-#include "DecoderBatchTest.h" +-#include "BeamSearchDecoder.h" +-#include "Vocabulary.h" +-#include "DiskXFile.h" +-#include "CmdLine.h" +-#include "PhoneInfo.h" +-#include "PhoneModels.h" +-#include "LexiconInfo.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch ; + +diff -Nur examples.orig/discriminatives/boosting.cc examples/discriminatives/boosting.cc +--- examples.orig/discriminatives/boosting.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/boosting.cc 2004-10-29 12:17:47.000000000 +0200 +@@ -3,23 +3,23 @@ + \n\ + This program will boost a MLP (for classification) with log-softmax outputs.\n"; + +-#include "MatDataSet.h" +-#include "ClassFormatDataSet.h" +-#include "ClassNLLCriterion.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +- +-#include "StochasticGradient.h" +-#include "KFold.h" +- +-#include "MeanVarNorm.h" +-#include "DiskXFile.h" +-#include "CmdLine.h" +-#include "Random.h" +- +-#include "MLP.h" +-#include "WeightedSumMachine.h" +-#include "Boosting.h" ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/knn.cc examples/discriminatives/knn.cc +--- examples.orig/discriminatives/knn.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/knn.cc 2004-10-29 12:18:00.000000000 +0200 +@@ -3,21 +3,21 @@ + \n\ + This program will train a KNN.\n"; + +-#include "MatDataSet.h" +-#include "ClassFormatDataSet.h" +-#include "ClassNLLCriterion.h" +-#include "MSECriterion.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +- +-#include "NPTrainer.h" +-#include "KFold.h" +-#include "KNN.h" +- +-#include "MeanVarNorm.h" +-#include "CmdLine.h" +-#include "Random.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/mlp.cc examples/discriminatives/mlp.cc +--- examples.orig/discriminatives/mlp.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/mlp.cc 2004-10-29 12:18:05.000000000 +0200 +@@ -6,26 +6,26 @@ + For classification, the criterion will be a cross-entropy criterion.\n\ + For regression, it uses a mean-squared error criterion.\n"; + +-#include "MatDataSet.h" +-#include "ClassFormatDataSet.h" +-#include "ClassNLLCriterion.h" +-#include "MSECriterion.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +- +-#include "StochasticGradient.h" +-#include "KFold.h" +- +-#include "ConnectedMachine.h" +-#include "Linear.h" +-#include "Tanh.h" +-#include "LogSoftMax.h" +- +-#include "MeanVarNorm.h" +-#include "DiskXFile.h" +-#include "CmdLine.h" +-#include "Random.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/svm.cc examples/discriminatives/svm.cc +--- examples.orig/discriminatives/svm.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/svm.cc 2004-10-29 12:18:22.000000000 +0200 +@@ -7,19 +7,19 @@ + except if you use the '-class' option which trains one class\n\ + against the others.\n"; + +-#include "MatDataSet.h" +-#include "TwoClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +-#include "QCTrainer.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "SVMRegression.h" +-#include "SVMClassification.h" +-#include "KFold.h" +-#include "DiskXFile.h" +-#include "ClassFormatDataSet.h" +-#include "MeanVarNorm.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/svm_multi.cc examples/discriminatives/svm_multi.cc +--- examples.orig/discriminatives/svm_multi.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/svm_multi.cc 2004-10-29 12:18:28.000000000 +0200 +@@ -5,16 +5,16 @@ + more than two classes, using a one-against-all approach.\n\ + It uses a gaussian kernel (default) or a polynomial kernel.\n"; + +-#include "MatDataSet.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +-#include "QCTrainer.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "SVMClassification.h" +-#include "DiskXFile.h" +-#include "ClassFormatDataSet.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/generatives/gmm.cc examples/generatives/gmm.cc +--- examples.orig/generatives/gmm.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/generatives/gmm.cc 2004-10-29 12:19:06.000000000 +0200 +@@ -3,17 +3,17 @@ + \n\ + This program will maximize the likelihood of data given a Diagonal GMM \n"; + +-#include "EMTrainer.h" +-#include "MeanVarNorm.h" +-#include "DiagonalGMM.h" +-#include "KFold.h" +-#include "KMeans.h" +-#include "DiskMatDataSet.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/generatives/hmm.cc examples/generatives/hmm.cc +--- examples.orig/generatives/hmm.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/generatives/hmm.cc 2004-10-29 12:19:11.000000000 +0200 +@@ -3,16 +3,16 @@ + \n\ + This program will maximize the likelihood of data given a Diagonal GMM \n"; + +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "KFold.h" +-#include "KMeans.h" +-#include "HTKDataSet.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + + using namespace Torch; +diff -Nur examples.orig/generatives/kmeans.cc examples/generatives/kmeans.cc +--- examples.orig/generatives/kmeans.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/generatives/kmeans.cc 2004-10-29 12:19:16.000000000 +0200 +@@ -3,18 +3,18 @@ + \n\ + This program will maximize the kmeans criterion of a dataset\n"; + +-#include "EMTrainer.h" +-#include "StochasticGradient.h" +-#include "MeanVarNorm.h" +-#include "KFold.h" +-#include "KMeans.h" +-#include "DiskMatDataSet.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "NLLCriterion.h" +-#include "Random.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + + using namespace Torch; +diff -Nur examples.orig/speech/speech_hmm_init.cc examples/speech/speech_hmm_init.cc +--- examples.orig/speech/speech_hmm_init.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_init.cc 2004-10-29 12:19:46.000000000 +0200 +@@ -3,19 +3,19 @@ + \n\ + This program is used to do speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "KMeans.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "SpeechHMM.h" +-#include "string_utils.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/speech/speech_hmm_simple_decode.cc examples/speech/speech_hmm_simple_decode.cc +--- examples.orig/speech/speech_hmm_simple_decode.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_simple_decode.cc 2004-10-29 12:20:04.000000000 +0200 +@@ -3,20 +3,20 @@ + \n\ + This program is used to do decode simple speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "SimpleDecoderSpeechHMM.h" +-#include "WordSegMeasurer.h" +-#include "FrameSegMeasurer.h" +-#include "Grammar.h" +-#include "DiagonalGMM.h" +-#include "string_utils.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/speech/speech_hmm_tode_decode.cc examples/speech/speech_hmm_tode_decode.cc +--- examples.orig/speech/speech_hmm_tode_decode.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_tode_decode.cc 2004-10-29 12:20:09.000000000 +0200 +@@ -3,22 +3,22 @@ + \n\ + This program is used to do decode simple speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "PhoneModels.h" +-#include "LanguageModel.h" +-#include "LinearLexicon.h" +-#include "BeamSearchDecoder.h" +-#include "DiagonalGMM.h" +-#include "string_utils.h" +-#include "EditDistanceMeasurer.h" +-#include "WordSegMeasurer.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/speech/speech_hmm_train.cc examples/speech/speech_hmm_train.cc +--- examples.orig/speech/speech_hmm_train.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_train.cc 2004-10-29 12:20:14.000000000 +0200 +@@ -3,19 +3,19 @@ + \n\ + This program is used to do speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "DiagonalGMM.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "SpeechHMM.h" +-#include "FileListCmdOption.h" +-#include "string_utils.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + --- torch3-3.1.orig/debian/patches/general_debug.diff +++ torch3-3.1/debian/patches/general_debug.diff @@ -0,0 +1,42 @@ +--- core/general.cc.orig 2004-08-11 18:34:36.000000000 +0200 ++++ core/general.cc 2004-10-29 11:59:55.000000000 +0200 +@@ -37,8 +37,8 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("\n$ Error: %s\n\n", xxpetit_message_pour_melanie); +- fflush(stdout); ++ fprintf(stderr, "\n$ Error: %s\n\n", xxpetit_message_pour_melanie); ++ fflush(stderr); + va_end(args); + exit(-1); + } +@@ -48,8 +48,8 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("! Warning: %s\n", xxpetit_message_pour_melanie); +- fflush(stdout); ++ fprintf(stderr, "! Warning: %s\n", xxpetit_message_pour_melanie); ++ fflush(stderr); + va_end(args); + } + +@@ -58,7 +58,7 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("# %s\n", xxpetit_message_pour_melanie); ++ fprintf(stdout, "# %s\n", xxpetit_message_pour_melanie); + fflush(stdout); + va_end(args); + } +@@ -68,7 +68,7 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("%s", xxpetit_message_pour_melanie); ++ fprintf(stdout, "%s", xxpetit_message_pour_melanie); + fflush(stdout); + va_end(args); + } --- torch3-3.1.orig/debian/rules +++ torch3-3.1/debian/rules @@ -0,0 +1,133 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +package=libtorch3c2 +devpackage=libtorch3-dev + +# library's modules to be compiled +PACKAGES := core convolutions datasets decoder \ + distributions gradients kernels matrix \ + nonparametrics speech + +COMPILEDLIBDIR := $(CURDIR)/lib + +# shared library versions, option 1 +major=3 +version=$(major).0.0 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) depend PACKAGES="$(PACKAGES)" + $(MAKE) PACKAGES="$(PACKAGES)" + #LIBTORCH="$(CURDIR)/lib/libtorch.a" + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean PACKAGES="$(PACKAGES)" + find $(CURDIR)/examples -name Linux_\* -exec rm -rf {} \; + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp + #$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + + install -m 0644 $(COMPILEDLIBDIR)/libtorch.so.$(version) \ + $(CURDIR)/debian/$(package)/usr/lib/ + #ln -s $(CURDIR)/debian/$(package)/usr/lib/libtorch.so.$(version) + ln -s libtorch.so.$(version) \ + $(CURDIR)/debian/$(package)/usr/lib/libtorch.so.$(major) + + ln -s libtorch.so.$(version) \ + $(CURDIR)/debian/$(devpackage)/usr/lib/libtorch.so + install -m 0644 $(COMPILEDLIBDIR)/libtorch.a \ + $(CURDIR)/debian/$(devpackage)/usr/lib/ + + install -m 0644 $(foreach f, $(PACKAGES), $(f)/*.h) \ + $(CURDIR)/debian/$(devpackage)/usr/include/torch/ + + install -m 0644 -d $(devpackage)/usr/share/doc/$(devpackage)/patches + install -m 0644 $(CURDIR)/debian/patches/* \ + $(devpackage)/usr/share/doc/$(devpackage)/patches + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress -X.cc + dh_fixperms +# dh_perl +# d_python + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- torch3-3.1.orig/debian/source/format +++ torch3-3.1/debian/source/format @@ -0,0 +1 @@ +1.0 --- torch3-3.1.orig/decoder/Makefile +++ torch3-3.1/decoder/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/distributions/Makefile +++ torch3-3.1/distributions/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/examples/Makefile +++ torch3-3.1/examples/Makefile @@ -0,0 +1,18 @@ +# +# Torch user Makefile example +# + +# Torch location. +# Make sure to specify correct location... + +#TORCHDIR := $(shell cd ../..; pwd) + +# +# All that follows you can probably keep as is... +# + +#OS := $(shell uname -s | tr '/' '_') +include Makefile_options_Debian + +%: %.cc + $(CC) $(CFLAGS_$(MODE)) -ltorch $< -o $@ --- torch3-3.1.orig/examples/Makefile_options_Debian +++ torch3-3.1/examples/Makefile_options_Debian @@ -0,0 +1,75 @@ +# +# What you have to check... +# + +# Packages you want to use +PACKAGES = convolutions datasets decoder distributions gradients kernels matrix nonparametrics speech +#PACKAGES = + +# Magik key if you have several makefile +# for the same platform +MAGIK_KEY = + +# Compiler, linker and archiver +CC = g++ +CXX = g++ +LD = $(CC) +AR = ar -rus + +# Command for creating dependencies +DEP = $(CC) -MM + +# Your librairies +# (for example "-lm", but not needed on most systems...) +MYLIBS = + +# Your includes +# (for example -I/usr/local/special) +MYINCS = + +# optimize mode +#DEBUG = OPT +# debug mode +DEBUG = DBG + +# double version +#FLOATING = DOUBLE +# floating version +FLOATING = FLOAT + +# Debug double mode +CFLAGS_DBG_DOUBLE = -g -Wall -DUSE_DOUBLE -DDEBUG + +# Debug float mode +CFLAGS_DBG_FLOAT = -g -Wall -DDEBUG + +# Optimized double mode +#CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double -DUSE_DOUBLE +CFLAGS_OPT_DOUBLE = -Wall -O2 -ffast-math -DUSE_DOUBLE + +# Optimized float mode +#CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math -mcpu=i686 -march=i686 -malign-double +CFLAGS_OPT_FLOAT = -Wall -O2 -ffast-math + +# +# +# Variables that you may find useful inside your Makefile +# Do not touch. +# +# + +MODE = $(DEBUG)_$(FLOATING) +#VERSION_KEY = $(MAGIK_KEY)$(OS)_$(MODE) +##LIBS_DIR = $(TORCHDIR)/lib/$(VERSION_KEY) +## Modified by KA for Debian +#LIBS_DIR = $(TORCHDIR)/lib/ +##OBJS_DIR = $(TORCHDIR)/objs/$(VERSION_KEY) +## Modified by KA for Debian +#OBJS_DIR = $(TORCHDIR)/objs/ +#LIBTORCH = $(LIBS_DIR)/libtorch.a +##LIBSOTORCH = $(LIBS_DIR)/libtorch.so +#LIBSOTORCH = $(LIBS_DIR)/libtorch.so.3.0.0 +##LIBS = -L$(TORCHDIR)/lib/$(VERSION_KEY) $(LIBTORCH) $(MYLIBS) +#LIBS = -L$(TORCHDIR)/lib/ $(LIBTORCH) $(MYLIBS) +##INCS := -I$(TORCHDIR)/core $(MYINCS) +#INCS += $(foreach f,$(PACKAGES),-I$(TORCHDIR)/$(f)) --- torch3-3.1.orig/examples/decoder/Makefile +++ torch3-3.1/examples/decoder/Makefile @@ -11,7 +11,7 @@ # All that follows you can probably keep as is... # -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') include $(TORCHDIR)/Makefile_options_$(OS) %: %.cc --- torch3-3.1.orig/examples/decoder/tode.cc +++ torch3-3.1/examples/decoder/tode.cc @@ -1,13 +1,13 @@ -#include "LinearLexicon.h" -#include "LanguageModel.h" -#include "DecoderBatchTest.h" -#include "BeamSearchDecoder.h" -#include "Vocabulary.h" -#include "DiskXFile.h" -#include "CmdLine.h" -#include "PhoneInfo.h" -#include "PhoneModels.h" -#include "LexiconInfo.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch ; --- torch3-3.1.orig/examples/discriminatives/Makefile +++ torch3-3.1/examples/discriminatives/Makefile @@ -11,7 +11,7 @@ # All that follows you can probably keep as is... # -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') include $(TORCHDIR)/Makefile_options_$(OS) %: %.cc --- torch3-3.1.orig/examples/discriminatives/boosting.cc +++ torch3-3.1/examples/discriminatives/boosting.cc @@ -3,23 +3,23 @@ \n\ This program will boost a MLP (for classification) with log-softmax outputs.\n"; -#include "MatDataSet.h" -#include "ClassFormatDataSet.h" -#include "ClassNLLCriterion.h" -#include "OneHotClassFormat.h" -#include "ClassMeasurer.h" - -#include "StochasticGradient.h" -#include "KFold.h" - -#include "MeanVarNorm.h" -#include "DiskXFile.h" -#include "CmdLine.h" -#include "Random.h" - -#include "MLP.h" -#include "WeightedSumMachine.h" -#include "Boosting.h" +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/discriminatives/knn.cc +++ torch3-3.1/examples/discriminatives/knn.cc @@ -3,21 +3,21 @@ \n\ This program will train a KNN.\n"; -#include "MatDataSet.h" -#include "ClassFormatDataSet.h" -#include "ClassNLLCriterion.h" -#include "MSECriterion.h" -#include "OneHotClassFormat.h" -#include "ClassMeasurer.h" -#include "MSEMeasurer.h" +#include +#include +#include +#include +#include +#include +#include -#include "NPTrainer.h" -#include "KFold.h" -#include "KNN.h" +#include +#include +#include -#include "MeanVarNorm.h" -#include "CmdLine.h" -#include "Random.h" +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/discriminatives/mlp.cc +++ torch3-3.1/examples/discriminatives/mlp.cc @@ -6,26 +6,26 @@ For classification, the criterion will be a cross-entropy criterion.\n\ For regression, it uses a mean-squared error criterion.\n"; -#include "MatDataSet.h" -#include "ClassFormatDataSet.h" -#include "ClassNLLCriterion.h" -#include "MSECriterion.h" -#include "OneHotClassFormat.h" -#include "ClassMeasurer.h" -#include "MSEMeasurer.h" - -#include "StochasticGradient.h" -#include "KFold.h" - -#include "ConnectedMachine.h" -#include "Linear.h" -#include "Tanh.h" -#include "LogSoftMax.h" - -#include "MeanVarNorm.h" -#include "DiskXFile.h" -#include "CmdLine.h" -#include "Random.h" +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/discriminatives/svm.cc +++ torch3-3.1/examples/discriminatives/svm.cc @@ -7,19 +7,19 @@ except if you use the '-class' option which trains one class\n\ against the others.\n"; -#include "MatDataSet.h" -#include "TwoClassFormat.h" -#include "ClassMeasurer.h" -#include "MSEMeasurer.h" -#include "QCTrainer.h" -#include "CmdLine.h" -#include "Random.h" -#include "SVMRegression.h" -#include "SVMClassification.h" -#include "KFold.h" -#include "DiskXFile.h" -#include "ClassFormatDataSet.h" -#include "MeanVarNorm.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/discriminatives/svm_multi.cc +++ torch3-3.1/examples/discriminatives/svm_multi.cc @@ -5,16 +5,16 @@ more than two classes, using a one-against-all approach.\n\ It uses a gaussian kernel (default) or a polynomial kernel.\n"; -#include "MatDataSet.h" -#include "OneHotClassFormat.h" -#include "ClassMeasurer.h" -#include "MSEMeasurer.h" -#include "QCTrainer.h" -#include "CmdLine.h" -#include "Random.h" -#include "SVMClassification.h" -#include "DiskXFile.h" -#include "ClassFormatDataSet.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/generatives/Makefile +++ torch3-3.1/examples/generatives/Makefile @@ -11,7 +11,7 @@ # All that follows you can probably keep as is... # -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') include $(TORCHDIR)/Makefile_options_$(OS) %: %.cc --- torch3-3.1.orig/examples/generatives/gmm.cc +++ torch3-3.1/examples/generatives/gmm.cc @@ -3,17 +3,17 @@ \n\ This program will maximize the likelihood of data given a Diagonal GMM \n"; -#include "EMTrainer.h" -#include "MeanVarNorm.h" -#include "DiagonalGMM.h" -#include "KFold.h" -#include "KMeans.h" -#include "DiskMatDataSet.h" -#include "MatDataSet.h" -#include "CmdLine.h" -#include "NLLMeasurer.h" -#include "Random.h" -#include "FileListCmdOption.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/generatives/hmm.cc +++ torch3-3.1/examples/generatives/hmm.cc @@ -3,16 +3,16 @@ \n\ This program will maximize the likelihood of data given a Diagonal GMM \n"; -#include "EMTrainer.h" -#include "HMM.h" -#include "KFold.h" -#include "KMeans.h" -#include "HTKDataSet.h" -#include "MatDataSet.h" -#include "CmdLine.h" -#include "NLLMeasurer.h" -#include "Random.h" -#include "FileListCmdOption.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include using namespace Torch; --- torch3-3.1.orig/examples/generatives/kmeans.cc +++ torch3-3.1/examples/generatives/kmeans.cc @@ -3,18 +3,18 @@ \n\ This program will maximize the kmeans criterion of a dataset\n"; -#include "EMTrainer.h" -#include "StochasticGradient.h" -#include "MeanVarNorm.h" -#include "KFold.h" -#include "KMeans.h" -#include "DiskMatDataSet.h" -#include "MatDataSet.h" -#include "CmdLine.h" -#include "NLLMeasurer.h" -#include "NLLCriterion.h" -#include "Random.h" -#include "FileListCmdOption.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include using namespace Torch; --- torch3-3.1.orig/examples/speech/Makefile +++ torch3-3.1/examples/speech/Makefile @@ -11,7 +11,7 @@ # All that follows you can probably keep as is... # -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') include $(TORCHDIR)/Makefile_options_$(OS) %: %.cc --- torch3-3.1.orig/examples/speech/speech_hmm_init.cc +++ torch3-3.1/examples/speech/speech_hmm_init.cc @@ -3,19 +3,19 @@ \n\ This program is used to do speech recognition \n"; -#include "LexiconInfo.h" -#include "EMTrainer.h" -#include "HMM.h" -#include "KMeans.h" -#include "MatDataSet.h" -#include "CmdLine.h" -#include "NLLMeasurer.h" -#include "Random.h" -#include "DiskHTKDataSet.h" -#include "HTKDataSet.h" -#include "SpeechHMM.h" -#include "string_utils.h" -#include "FileListCmdOption.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/speech/speech_hmm_simple_decode.cc +++ torch3-3.1/examples/speech/speech_hmm_simple_decode.cc @@ -3,20 +3,20 @@ \n\ This program is used to do decode simple speech recognition \n"; -#include "LexiconInfo.h" -#include "EMTrainer.h" -#include "HMM.h" -#include "CmdLine.h" -#include "Random.h" -#include "DiskHTKDataSet.h" -#include "HTKDataSet.h" -#include "SimpleDecoderSpeechHMM.h" -#include "WordSegMeasurer.h" -#include "FrameSegMeasurer.h" -#include "Grammar.h" -#include "DiagonalGMM.h" -#include "string_utils.h" -#include "FileListCmdOption.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/speech/speech_hmm_tode_decode.cc +++ torch3-3.1/examples/speech/speech_hmm_tode_decode.cc @@ -3,22 +3,22 @@ \n\ This program is used to do decode simple speech recognition \n"; -#include "LexiconInfo.h" -#include "EMTrainer.h" -#include "HMM.h" -#include "CmdLine.h" -#include "Random.h" -#include "DiskHTKDataSet.h" -#include "HTKDataSet.h" -#include "PhoneModels.h" -#include "LanguageModel.h" -#include "LinearLexicon.h" -#include "BeamSearchDecoder.h" -#include "DiagonalGMM.h" -#include "string_utils.h" -#include "EditDistanceMeasurer.h" -#include "WordSegMeasurer.h" -#include "FileListCmdOption.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/examples/speech/speech_hmm_train.cc +++ torch3-3.1/examples/speech/speech_hmm_train.cc @@ -3,19 +3,19 @@ \n\ This program is used to do speech recognition \n"; -#include "LexiconInfo.h" -#include "EMTrainer.h" -#include "HMM.h" -#include "DiagonalGMM.h" -#include "MatDataSet.h" -#include "CmdLine.h" -#include "NLLMeasurer.h" -#include "Random.h" -#include "DiskHTKDataSet.h" -#include "HTKDataSet.h" -#include "SpeechHMM.h" -#include "FileListCmdOption.h" -#include "string_utils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Torch; --- torch3-3.1.orig/gradients/Makefile +++ torch3-3.1/gradients/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/kernels/Makefile +++ torch3-3.1/kernels/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/libtorch3-dev/usr/share/doc/libtorch3-dev/patches/examples_includes.diff +++ torch3-3.1/libtorch3-dev/usr/share/doc/libtorch3-dev/patches/examples_includes.diff @@ -0,0 +1,475 @@ +diff -Nur examples.orig/decoder/tode.cc examples/decoder/tode.cc +--- examples.orig/decoder/tode.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/decoder/tode.cc 2004-10-29 12:03:34.000000000 +0200 +@@ -1,13 +1,13 @@ +-#include "LinearLexicon.h" +-#include "LanguageModel.h" +-#include "DecoderBatchTest.h" +-#include "BeamSearchDecoder.h" +-#include "Vocabulary.h" +-#include "DiskXFile.h" +-#include "CmdLine.h" +-#include "PhoneInfo.h" +-#include "PhoneModels.h" +-#include "LexiconInfo.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch ; + +diff -Nur examples.orig/discriminatives/boosting.cc examples/discriminatives/boosting.cc +--- examples.orig/discriminatives/boosting.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/boosting.cc 2004-10-29 12:17:47.000000000 +0200 +@@ -3,23 +3,23 @@ + \n\ + This program will boost a MLP (for classification) with log-softmax outputs.\n"; + +-#include "MatDataSet.h" +-#include "ClassFormatDataSet.h" +-#include "ClassNLLCriterion.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +- +-#include "StochasticGradient.h" +-#include "KFold.h" +- +-#include "MeanVarNorm.h" +-#include "DiskXFile.h" +-#include "CmdLine.h" +-#include "Random.h" +- +-#include "MLP.h" +-#include "WeightedSumMachine.h" +-#include "Boosting.h" ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/knn.cc examples/discriminatives/knn.cc +--- examples.orig/discriminatives/knn.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/knn.cc 2004-10-29 12:18:00.000000000 +0200 +@@ -3,21 +3,21 @@ + \n\ + This program will train a KNN.\n"; + +-#include "MatDataSet.h" +-#include "ClassFormatDataSet.h" +-#include "ClassNLLCriterion.h" +-#include "MSECriterion.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +- +-#include "NPTrainer.h" +-#include "KFold.h" +-#include "KNN.h" +- +-#include "MeanVarNorm.h" +-#include "CmdLine.h" +-#include "Random.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/mlp.cc examples/discriminatives/mlp.cc +--- examples.orig/discriminatives/mlp.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/mlp.cc 2004-10-29 12:18:05.000000000 +0200 +@@ -6,26 +6,26 @@ + For classification, the criterion will be a cross-entropy criterion.\n\ + For regression, it uses a mean-squared error criterion.\n"; + +-#include "MatDataSet.h" +-#include "ClassFormatDataSet.h" +-#include "ClassNLLCriterion.h" +-#include "MSECriterion.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +- +-#include "StochasticGradient.h" +-#include "KFold.h" +- +-#include "ConnectedMachine.h" +-#include "Linear.h" +-#include "Tanh.h" +-#include "LogSoftMax.h" +- +-#include "MeanVarNorm.h" +-#include "DiskXFile.h" +-#include "CmdLine.h" +-#include "Random.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/svm.cc examples/discriminatives/svm.cc +--- examples.orig/discriminatives/svm.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/svm.cc 2004-10-29 12:18:22.000000000 +0200 +@@ -7,19 +7,19 @@ + except if you use the '-class' option which trains one class\n\ + against the others.\n"; + +-#include "MatDataSet.h" +-#include "TwoClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +-#include "QCTrainer.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "SVMRegression.h" +-#include "SVMClassification.h" +-#include "KFold.h" +-#include "DiskXFile.h" +-#include "ClassFormatDataSet.h" +-#include "MeanVarNorm.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/discriminatives/svm_multi.cc examples/discriminatives/svm_multi.cc +--- examples.orig/discriminatives/svm_multi.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/discriminatives/svm_multi.cc 2004-10-29 12:18:28.000000000 +0200 +@@ -5,16 +5,16 @@ + more than two classes, using a one-against-all approach.\n\ + It uses a gaussian kernel (default) or a polynomial kernel.\n"; + +-#include "MatDataSet.h" +-#include "OneHotClassFormat.h" +-#include "ClassMeasurer.h" +-#include "MSEMeasurer.h" +-#include "QCTrainer.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "SVMClassification.h" +-#include "DiskXFile.h" +-#include "ClassFormatDataSet.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/generatives/gmm.cc examples/generatives/gmm.cc +--- examples.orig/generatives/gmm.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/generatives/gmm.cc 2004-10-29 12:19:06.000000000 +0200 +@@ -3,17 +3,17 @@ + \n\ + This program will maximize the likelihood of data given a Diagonal GMM \n"; + +-#include "EMTrainer.h" +-#include "MeanVarNorm.h" +-#include "DiagonalGMM.h" +-#include "KFold.h" +-#include "KMeans.h" +-#include "DiskMatDataSet.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/generatives/hmm.cc examples/generatives/hmm.cc +--- examples.orig/generatives/hmm.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/generatives/hmm.cc 2004-10-29 12:19:11.000000000 +0200 +@@ -3,16 +3,16 @@ + \n\ + This program will maximize the likelihood of data given a Diagonal GMM \n"; + +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "KFold.h" +-#include "KMeans.h" +-#include "HTKDataSet.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + + using namespace Torch; +diff -Nur examples.orig/generatives/kmeans.cc examples/generatives/kmeans.cc +--- examples.orig/generatives/kmeans.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/generatives/kmeans.cc 2004-10-29 12:19:16.000000000 +0200 +@@ -3,18 +3,18 @@ + \n\ + This program will maximize the kmeans criterion of a dataset\n"; + +-#include "EMTrainer.h" +-#include "StochasticGradient.h" +-#include "MeanVarNorm.h" +-#include "KFold.h" +-#include "KMeans.h" +-#include "DiskMatDataSet.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "NLLCriterion.h" +-#include "Random.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + + using namespace Torch; +diff -Nur examples.orig/speech/speech_hmm_init.cc examples/speech/speech_hmm_init.cc +--- examples.orig/speech/speech_hmm_init.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_init.cc 2004-10-29 12:19:46.000000000 +0200 +@@ -3,19 +3,19 @@ + \n\ + This program is used to do speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "KMeans.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "SpeechHMM.h" +-#include "string_utils.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/speech/speech_hmm_simple_decode.cc examples/speech/speech_hmm_simple_decode.cc +--- examples.orig/speech/speech_hmm_simple_decode.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_simple_decode.cc 2004-10-29 12:20:04.000000000 +0200 +@@ -3,20 +3,20 @@ + \n\ + This program is used to do decode simple speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "SimpleDecoderSpeechHMM.h" +-#include "WordSegMeasurer.h" +-#include "FrameSegMeasurer.h" +-#include "Grammar.h" +-#include "DiagonalGMM.h" +-#include "string_utils.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/speech/speech_hmm_tode_decode.cc examples/speech/speech_hmm_tode_decode.cc +--- examples.orig/speech/speech_hmm_tode_decode.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_tode_decode.cc 2004-10-29 12:20:09.000000000 +0200 +@@ -3,22 +3,22 @@ + \n\ + This program is used to do decode simple speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "CmdLine.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "PhoneModels.h" +-#include "LanguageModel.h" +-#include "LinearLexicon.h" +-#include "BeamSearchDecoder.h" +-#include "DiagonalGMM.h" +-#include "string_utils.h" +-#include "EditDistanceMeasurer.h" +-#include "WordSegMeasurer.h" +-#include "FileListCmdOption.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + +diff -Nur examples.orig/speech/speech_hmm_train.cc examples/speech/speech_hmm_train.cc +--- examples.orig/speech/speech_hmm_train.cc 2004-08-11 18:34:39.000000000 +0200 ++++ examples/speech/speech_hmm_train.cc 2004-10-29 12:20:14.000000000 +0200 +@@ -3,19 +3,19 @@ + \n\ + This program is used to do speech recognition \n"; + +-#include "LexiconInfo.h" +-#include "EMTrainer.h" +-#include "HMM.h" +-#include "DiagonalGMM.h" +-#include "MatDataSet.h" +-#include "CmdLine.h" +-#include "NLLMeasurer.h" +-#include "Random.h" +-#include "DiskHTKDataSet.h" +-#include "HTKDataSet.h" +-#include "SpeechHMM.h" +-#include "FileListCmdOption.h" +-#include "string_utils.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + using namespace Torch; + --- torch3-3.1.orig/libtorch3-dev/usr/share/doc/libtorch3-dev/patches/general_debug.diff +++ torch3-3.1/libtorch3-dev/usr/share/doc/libtorch3-dev/patches/general_debug.diff @@ -0,0 +1,42 @@ +--- core/general.cc.orig 2004-08-11 18:34:36.000000000 +0200 ++++ core/general.cc 2004-10-29 11:59:55.000000000 +0200 +@@ -37,8 +37,8 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("\n$ Error: %s\n\n", xxpetit_message_pour_melanie); +- fflush(stdout); ++ fprintf(stderr, "\n$ Error: %s\n\n", xxpetit_message_pour_melanie); ++ fflush(stderr); + va_end(args); + exit(-1); + } +@@ -48,8 +48,8 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("! Warning: %s\n", xxpetit_message_pour_melanie); +- fflush(stdout); ++ fprintf(stderr, "! Warning: %s\n", xxpetit_message_pour_melanie); ++ fflush(stderr); + va_end(args); + } + +@@ -58,7 +58,7 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("# %s\n", xxpetit_message_pour_melanie); ++ fprintf(stdout, "# %s\n", xxpetit_message_pour_melanie); + fflush(stdout); + va_end(args); + } +@@ -68,7 +68,7 @@ + va_list args; + va_start(args,msg); + vsprintf(xxpetit_message_pour_melanie, msg, args); +- printf("%s", xxpetit_message_pour_melanie); ++ fprintf(stdout, "%s", xxpetit_message_pour_melanie); + fflush(stdout); + va_end(args); + } --- torch3-3.1.orig/matrix/Makefile +++ torch3-3.1/matrix/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/nonparametrics/Makefile +++ torch3-3.1/nonparametrics/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/speech/Makefile +++ torch3-3.1/speech/Makefile @@ -1,5 +1,5 @@ # get user and architecture specific options -OS := $(shell uname -s) +OS := $(shell uname -s | tr '/' '_') TORCHDIR := $(shell cd ..; pwd) include ../Makefile_options_$(OS) --- torch3-3.1.orig/xmake +++ torch3-3.1/xmake @@ -81,14 +81,15 @@ def readConfig(override_debug_mode): config = Config() config.os = os.uname()[0] + torch_dir = 'torch3-3.1' the_current_dir = os.getcwd() + "/" - the_torch3_index = string.rfind(the_current_dir, "/Torch3/") + the_torch3_index = string.rfind(the_current_dir, "/%s"%torch_dir) if(the_torch3_index < 0): print "$ Torch3 directory not found" sys.exit(0) - config.torch_dir = the_current_dir[0:the_torch3_index] + "/Torch3" + config.torch_dir = the_current_dir[0:the_torch3_index] + "/%s"%torch_dir config_file = ConfigParser.ConfigParser() config_file.read(config.torch_dir + "/" + config.os + ".cfg")