git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@826 b431acfa-c32f-4a4a-93f1-934dc6c82436
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
/*
|
|
* File: RnnStack.hpp
|
|
* Author: jens
|
|
*
|
|
* Created on 17. Januar 2022, 12:43
|
|
*/
|
|
|
|
#ifndef RNNSTACK_HPP
|
|
#define RNNSTACK_HPP
|
|
|
|
#include "AStack.hpp"
|
|
|
|
class RnnStack : public AStack
|
|
{
|
|
public:
|
|
RnnStack(const std::string &name, size_t numContext);
|
|
RnnStack(const RnnStack& orig) = delete;
|
|
virtual ~RnnStack();
|
|
|
|
arma::mat trainingBatchFrom(size_t layerId, const arma::mat& batch) override;
|
|
void train(const arma::mat& batch, Rbm::IListener* pListener) override;
|
|
void train(size_t layerId, const arma::mat& batch, Rbm::IListener* pListener) override;
|
|
|
|
size_t getSeqLen();
|
|
size_t numContext();
|
|
arma::mat v_to_vc(const arma::mat &v) const;
|
|
arma::mat v_to_vc(const arma::mat &v, const arma::mat &c) const;
|
|
arma::mat vc_to_v(const arma::mat &vc) const;
|
|
arma::mat vc_to_c(const arma::mat &vc) const;
|
|
|
|
private:
|
|
size_t m_numContext;
|
|
|
|
};
|
|
|
|
#endif /* RNNSTACK_HPP */
|
|
|