2using System.Collections.Generic;
15 [TypeConverter(typeof(ExpandableObjectConverter))]
18 string m_strTarget =
"";
19 string m_strSourceVocabFile =
"";
20 string m_strTargetVocabFile =
"";
22 string m_strVocabDataUrl =
"";
23 string m_strVocabDataDstFile =
"";
35 [Description(
"Specifies the data target (decoder input) based on the INPUT_TYPE used. Each dataset has both a training and testing data source and target consisting of matching lines.")]
38 get {
return m_strTarget; }
39 set { m_strTarget = value; }
45 [Description(
"Specifies the URL to the vocabulary data file used with the SENTENCEPIECE vocabulary type. This pre-created vocabulary file is also created using the Python SentencePieceProcess.")]
48 get {
return m_strVocabDataUrl; }
49 set { m_strVocabDataUrl = value; }
57 get {
return m_strVocabDataDstFile; }
58 set { m_strVocabDataDstFile = value; }
64 [Description(
"Specifies the source vocabulary file used with the SENTENCEPIECE vocabulary type. The vocabulary file is created using the Python SentencePieceProcess.")]
67 get {
return m_strSourceVocabFile; }
68 set { m_strSourceVocabFile = value; }
74 [Description(
"Specifies the target vocabulary file used with the SENTENCEPIECE vocabulary type. The vocabulary file is created using the Python SentencePieceProcess.")]
77 get {
return m_strTargetVocabFile; }
78 set { m_strTargetVocabFile = value; }
84 [Description(
"Specifies the maximum items to load - primarily used for testing.")]
87 get {
return m_nMaxLoad; }
88 set { m_nMaxLoad = value; }
92 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
135 RawProto rpBase = base.ToProto(
"data");
140 rgChildren.
Add(
"target",
"\"" +
target +
"\"");
149 return new RawProto(strName,
"", rgChildren);
164 if ((strVal = rp.
FindValue(
"target")) !=
null)
167 if ((strVal = rp.
FindValue(
"target_vocab_file")) !=
null)
170 if ((strVal = rp.
FindValue(
"source_vocab_file")) !=
null)
173 if ((strVal = rp.
FindValue(
"max_load")) !=
null)
176 if ((strVal = rp.
FindValue(
"vocab_data_url")) !=
null)
179 if ((strVal = rp.
FindValue(
"vocab_data_dst_file")) !=
null)
The RawProtoCollection class is a list of RawProto objects.
void Add(RawProto p)
Adds a RawProto to the collection.
The RawProto class is used to parse and output Google prototxt file data.
RawProtoCollection Children
Returns a collection of this nodes child nodes.
static RawProto Parse(string str)
Parses a prototxt and places it in a new RawProto.
string FindValue(string strName)
Searches for a falue of a node within this nodes children.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the TokenizedDataPairsLayer.
int max_load
Specifies the maximum items to load - primarily used for testing.
string vocab_data_url
Specifies the URL to the vocabulary data file used with the SENTENCEPIECE vocabulary type....
static new TokenizedDataPairsParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
string vocab_data_dst_file
Specifies the destination file where the vocabulary data file data is downloaded. This pre-created vo...
string target_vocab_file
Specifies the target vocabulary file used with the SENTENCEPIECE vocabulary type. The vocabulary file...
string source_vocab_file
Specifies the source vocabulary file used with the SENTENCEPIECE vocabulary type. The vocabulary file...
string target
Specifies the data source based on the INPUT_TYPE used. Each dataset has both a training and testing ...
TokenizedDataPairsParameter()
Constructor for the parameter.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
Specifies the parameters for the TokenizedDataLayer.
static TokenizedDataParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
VOCABULARY_TYPE vocabulary_type
Specifies the vocabulary type to use.
TokenizedDataParameter()
Constructor for the parameter.
VOCABULARY_TYPE
Defines the vocabulary type to use.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.param namespace contains parameters used to create models.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...