forked from microsoft/CNTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHTKMLFReader.h
51 lines (38 loc) · 1.37 KB
/
HTKMLFReader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
//
#pragma once
#include "ReaderBase.h"
#include "Config.h"
namespace Microsoft { namespace MSR { namespace CNTK {
// The class represents a factory for connecting the packer,
// transformers and HTK and MLF deserializers together.
// TODO: Should be deprecated. Composite reader should be used instead.
class HTKMLFReader : public ReaderBase
{
public:
HTKMLFReader(const ConfigParameters& parameters);
// Description of streams that this reader provides.
std::vector<StreamDescriptionPtr> GetStreamDescriptions() override;
// Starts a new epoch with the provided configuration.
void StartEpoch(const EpochConfiguration& config, const std::map<std::wstring, int>& requiredStreams) override;
private:
enum class PackingMode
{
sample,
sequence,
truncated
};
// All streams this reader provides.
std::vector<StreamDescriptionPtr> m_streams;
// TODO: Should be moved outside of the reader.
PackingMode m_packingMode;
// Seed for the random generator.
unsigned int m_seed;
// Truncation length for BPTT mode.
size_t m_truncationLength;
// Parallel sequences, used for legacy configs.
intargvector m_numParallelSequencesForAllEpochs;
};
}}}