コード例 #1
0
ファイル: datasequence.hpp プロジェクト: mIwav/simple-rnn
	void print(ostream& out, vector<string>* targetLabels = 0, vector<string>* inputLabels = 0) const
	{
		PRINT(tag, out);
		out << "input shape = (" << inputs.shape << ")" << endl;
		out << "timesteps = " << inputs.seq_size() << endl;
		if (targetLabelSeq.size() && targetLabels)
		{
			out << "target label sequence:" << endl;
			// out << label_seq_to_str(this->targetLabelSeq, *targetLabels) << endl;
		}
		if (targetPatterns.size())
		{
			out << "target shape = (" << targetPatterns.shape << ")" << endl;
		}
		if (verbose)
		{
			/*if(targetClasses.size() && targetLabels)
			{
				out << label_seq_to_str(this->targetClasses.data, *targetLabels) << endl;
			}*/
			/*if(inputClasses.size() && inputLabels)
			{
				out << label_seq_to_str(this->inputClasses.data, *inputLabels) << endl;
			}*/
		}
	}
コード例 #2
0
	void print(ostream& out, const bimap<int, string>* labels = 0) const
	{
		PRINT(tag, out);
		out << "input shape = (" << inputs.shape << ")" << endl;
		out << "timesteps = " << inputs.seq_size() << endl;
		if (labelSeq.size() && labels)
		{
			out << "target labels:" << endl;
			out << label_seq_to_str(this->labelSeq, *labels) << endl;
		}
		if (targetPatterns.size())
		{
			out << "target shape = (" << targetPatterns.shape << ")" << endl;
		}
	}
コード例 #3
0
ファイル: SeqBuffer.hpp プロジェクト: tpajenka/RNNLIB
	template<class T2> void reshape(const SeqBuffer<T2>& buff, const T& fillVal)
	{
		reshape(buff.seq_shape(), fillVal);
	}
コード例 #4
0
	size_t num_timesteps() const
	{
		return inputs.seq_size();
	}	
コード例 #5
0
ファイル: SeqBuffer.hpp プロジェクト: tpajenka/RNNLIB
	template<class T2> void reshape(const SeqBuffer<T2>& buff)
	{
		reshape(buff.seq_shape());
	}