diff --git a/bob/learn/misc/cpp/GMMMachine.cpp b/bob/learn/misc/cpp/GMMMachine.cpp index 2d81331187ff24b46792660534f9586631662278..a8636ce1f7dadc0b10659de8ed23d0a25c190a42 100644 --- a/bob/learn/misc/cpp/GMMMachine.cpp +++ b/bob/learn/misc/cpp/GMMMachine.cpp @@ -26,8 +26,7 @@ bob::learn::misc::GMMMachine::GMMMachine(bob::io::base::HDF5File& config): load(config); } -bob::learn::misc::GMMMachine::GMMMachine(const GMMMachine& other): - Machine<blitz::Array<double,1>, double>(other), m_gaussians(0) +bob::learn::misc::GMMMachine::GMMMachine(const GMMMachine& other) { copy(other); } @@ -94,9 +93,6 @@ void bob::learn::misc::GMMMachine::copy(const GMMMachine& other) { bob::learn::misc::GMMMachine::~GMMMachine() { } -void bob::learn::misc::GMMMachine::setNInputs(const size_t n_inputs) { - resize(m_n_gaussians,n_inputs); -} void bob::learn::misc::GMMMachine::resize(const size_t n_gaussians, const size_t n_inputs) { m_n_gaussians = n_gaussians; @@ -256,6 +252,7 @@ double bob::learn::misc::GMMMachine::logLikelihood_(const blitz::Array<double, 1 return logLikelihood_(x,m_cache_log_weighted_gaussian_likelihoods); } +/* void bob::learn::misc::GMMMachine::forward(const blitz::Array<double,1>& input, double& output) const { if(static_cast<size_t>(input.extent(0)) != m_n_inputs) { boost::format m("expected input size (%u) does not match the size of input array (%d)"); @@ -270,6 +267,7 @@ void bob::learn::misc::GMMMachine::forward_(const blitz::Array<double,1>& input, double& output) const { output = logLikelihood(input); } +*/ void bob::learn::misc::GMMMachine::accStatistics(const blitz::Array<double,2>& input, bob::learn::misc::GMMStats& stats) const { diff --git a/bob/learn/misc/include/bob.learn.misc/GMMMachine.h b/bob/learn/misc/include/bob.learn.misc/GMMMachine.h index 93ce2352a09a602acdc4fd7acf51b25d205322d1..331c1a49738d520e22959860ddbffe2bbf6b3b27 100644 --- a/bob/learn/misc/include/bob.learn.misc/GMMMachine.h +++ b/bob/learn/misc/include/bob.learn.misc/GMMMachine.h @@ -12,7 +12,6 @@ #ifndef BOB_LEARN_MISC_GMMMACHINE_H #define BOB_LEARN_MISC_GMMMACHINE_H -#include <bob.learn.misc/Machine.h> #include <bob.learn.misc/Gaussian.h> #include <bob.learn.misc/GMMStats.h> #include <bob.io.base/HDF5File.h> @@ -26,7 +25,7 @@ namespace bob { namespace learn { namespace misc { * @brief This class implements a multivariate diagonal Gaussian distribution. * @details See Section 2.3.9 of Bishop, "Pattern recognition and machine learning", 2006 */ -class GMMMachine: public Machine<blitz::Array<double,1>, double> +class GMMMachine { public: /** @@ -78,11 +77,6 @@ class GMMMachine: public Machine<blitz::Array<double,1>, double> */ virtual ~GMMMachine(); - /** - * Set the feature dimensionality - */ - void setNInputs(const size_t n_inputs); - /** * Get number of inputs */ @@ -225,14 +219,14 @@ class GMMMachine: public Machine<blitz::Array<double,1>, double> * (overrides Machine::forward) * Dimension of the input is checked */ - void forward(const blitz::Array<double,1>& input, double& output) const; + //void forward(const blitz::Array<double,1>& input, double& output) const; /** * Output the log likelihood of the sample, x * (overrides Machine::forward_) * @warning Dimension of the input is not checked */ - void forward_(const blitz::Array<double,1>& input, double& output) const; + //void forward_(const blitz::Array<double,1>& input, double& output) const; /** * Accumulates the GMM statistics over a set of samples.