.. _program_listing_file_src_models_encoder.h: Program Listing for File encoder.h ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/models/encoder.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include "marian.h" #include "models/states.h" namespace marian { class EncoderBase : public EncoderDecoderLayerBase { public: EncoderBase(Ptr graph, Ptr options) : EncoderDecoderLayerBase(graph, options, "encoder", /*batchIndex=*/0, options->get("dropout-src", 0.0f), options->get("embedding-fix-src", false)) {} // @TODO: turn into an interface. Also see if we can get rid of the graph parameter. virtual Ptr build(Ptr, Ptr) = 0; virtual void clear() = 0; }; } // namespace marian