3using System.Collections.Generic;
6using System.Threading.Tasks;
58 int[]
Tokenize(
string str,
bool bAddBos,
bool bAddEos);
65 List<int>
Tokenize(
string str1,
bool bMustExist =
true);
73 string Detokenize(
float[] rgf,
bool bIgnoreBos,
bool bIgnoreEos);
81 string Detokenize(
int nIdxToken,
bool bIgnoreBos,
bool bIgnoreEos);
125 if (nRandomSeed.HasValue)
126 m_random =
new Random(nRandomSeed.Value);
159 public abstract Tuple<float[], float[]>
GetData(
int nBatchSize,
int nBlockSize,
InputData trgData, out
int[] rgnIdx);
167 public abstract Tuple<float[], float[]>
GetDataAt(
int nBatchSize,
int nBlockSize,
int[] rgnIdx);
175 public abstract List<int>
Tokenize(
string str,
bool bAddBos,
bool bAddEos);
183 public abstract string Detokenize(
int nTokIdx,
bool bIgnoreBos,
bool bIgnoreEos);
193 public abstract string Detokenize(
float[] rgf,
int nStartIdx,
int nCount,
bool bIgnoreBos,
bool bIgnoreEos);
197 public abstract char BOS {
get; }
201 public abstract char EOS {
get; }
The CancelEvent provides an extension to the manual cancel event that allows for overriding the manua...
The Log class provides general output in text form.
The IVocabulary interface specifies the interface that all Vocabularies implement.
char EOS
Returns the special EOS character.
int Build()
Build the vocabulary.
int[] CreateTarget(int[] rgSrc)
Create a target that is offset from the source by one and ends with a EOS.
int[] Tokenize(string str, bool bAddBos, bool bAddEos)
Tokenize a string of data.
int BuildFromString(string strData)
Build the vocabulary from a string.
char BOS
Returns the special BOS character.
int Count
Returns the size of the vocabulary.
List< int > Tokenize(string str1, bool bMustExist=true)
Tokenize a character into its corresponding index token.
string Detokenize(int nIdxToken, bool bIgnoreBos, bool bIgnoreEos)
Detokenize an index token into its corresponding character.
string Detokenize(float[] rgf, bool bIgnoreBos, bool bIgnoreEos)
Detokenize an array into a string.
void Add(string str)
Add a new string to the vocabulary.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Phase
Defines the Phase under which to run a Net.
The MyCaffe.layers.gpt namespace contains all GPT related layers.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...