https://github.com/Microsoft/CNTK
Raw File
Tip revision: 5ce390cc59c17204b86ba1e84a3b60c45f112b09 authored by Spandan Tiwari on 16 July 2018, 20:59:29 UTC
Adding automatic pack/unpack wrapper for simple batch axis ONNX ops. MaxPool, AveragePool, GlobalAveragePool, GlobalMaxPool enabled.
Tip revision: 5ce390c
LatticeIndexBuilder.h
//
// 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 <boost/noncopyable.hpp>
#include "IndexBuilder.h"

namespace CNTK {

    class LatticeIndexBuilder : public IndexBuilder
    {
    public:
        LatticeIndexBuilder(const FileWrapper& latticeFile, const std::vector<std::string>& latticeToc, CorpusDescriptorPtr corpus, bool lastChunkInTOC);

        virtual std::wstring GetCacheFilename() override;

    private:
        virtual void Populate(std::shared_ptr<Index>& index) override;
        void AddSequence(std::shared_ptr<Index>& index, size_t id, size_t byteOffset, size_t prevSequenceStartOffset, const std::string& seqKey);
        std::vector<std::string> m_latticeToc;
        bool m_lastChunkInTOC;
    };

} // namespace
back to top