29 references to CheckDecode
Microsoft.ML.Core (1)
Data\Repository.cs (1)
540
ExceptionContext.
CheckDecode
(entry.Length < int.MaxValue, "Repository stream too large to read into memory");
Microsoft.ML.Data (26)
DataLoadSave\Binary\BinaryLoader.cs (15)
255
_ectx.
CheckDecode
(0 <= compLen, "negative compressed block length detected");
256
_ectx.
CheckDecode
(0 <= decompLen, "negative decompressed block length detected");
261
_ectx.
CheckDecode
(Header.HeaderSize <= offset && offset <= _parent._header.TailOffset - compLen, "block offset out of range");
326
ch.
CheckDecode
(0 < mtocCount && mtocCount < int.MaxValue,
337
ch.
CheckDecode
(!string.IsNullOrEmpty(kind), "Metadata kind must be non-empty string");
338
ch.
CheckDecode
(kinds.Add(kind), "Duplicate metadata kind read from file");
346
ch.
CheckDecode
(Header.HeaderSize <= blockOffset && blockOffset <= _parent._header.TailOffset,
349
ch.
CheckDecode
(ublockSize <= long.MaxValue, "Metadata block size out of range");
351
ch.
CheckDecode
(0 < blockSize && blockSize <= _parent._header.TailOffset - blockOffset,
1047
_host.
CheckDecode
(header.Signature == Header.SignatureValue,
1077
_host.
CheckDecode
(header.RowCount >= 0, "Row count cannot be negative");
1078
_host.
CheckDecode
(header.ColumnCount >= 0, "Column count cannot be negative");
1088
_host.
CheckDecode
(tailSig == Header.TailSignatureValue, "Incorrect tail signature");
1129
ch.
CheckDecode
(Header.HeaderSize <= lookupOffset && lookupOffset <= _header.TailOffset - 16 * lookupLen,
1133
ch.
CheckDecode
(metadataTocOffset == 0 || Header.HeaderSize <= metadataTocOffset && metadataTocOffset <= _header.TailOffset,
DataLoadSave\TransformerChain.cs (1)
296
env.
CheckDecode
(roles != null, "Predictor model must contain role mappings");
DataLoadSave\Transpose\TransposeLoader.cs (4)
575
_host.
CheckDecode
(header.Signature == Header.SignatureValue,
596
_host.
CheckDecode
(header.RowCount >= 0, "Row count cannot be negative");
597
_host.
CheckDecode
(header.ColumnCount >= 0, "Column count cannot be negative");
607
_host.
CheckDecode
(tailSig == Header.TailSignatureValue, "Incorrect tail signature");
Dirty\ModelParametersBase.cs (1)
44
Host.
CheckDecode
(cbFloat == sizeof(float), "This file was saved by an incompatible version");
EntryPoints\PredictorModelImpl.cs (2)
52
env.
CheckDecode
(roles != null, "Predictor model must contain role mappings");
56
env.
CheckDecode
(Predictor != null, "Predictor model must contain a predictor");
Utilities\ModelFileUtils.cs (3)
193
env.
CheckDecode
(ent != null, "Loader is not found.");
314
h.
CheckDecode
(!string.IsNullOrWhiteSpace(roleStr), "Role name must not be empty");
315
h.
CheckDecode
(!string.IsNullOrWhiteSpace(colStr), "Column name must not be empty");
Microsoft.ML.Mkl.Components (2)
VectorWhitening.cs (2)
238
ectx.
CheckDecode
(Utils.Size(model) == valueCount * valueCount, "Invalid model size.");
240
ectx.
CheckDecode
(FloatUtils.IsFinite(model[i]), "Found NaN or infinity in the model.");