private WeightedAverage(IHostEnvironment env, ModelLoadContext ctx) : base(env, LoaderSignature, ctx) { // *** Binary format *** // int: _weightageKind _weightageKind = (WeightageKind)ctx.Reader.ReadInt32(); Host.CheckDecode(Enum.IsDefined(typeof(WeightageKind), _weightageKind)); }
public WeightedAverage(IHostEnvironment env, Options options) : base(env, LoaderSignature) { _weightageKind = options.WeightageName; Host.CheckUserArg(Enum.IsDefined(typeof(WeightageKind), _weightageKind), nameof(options.WeightageName)); }