Esempio n. 1
0
        private MultiWeightedAverage(IHostEnvironment env, ModelLoadContext ctx)
            : base(env, LoaderSignature, ctx)
        {
            // *** Binary format ***
            // int: _weightageKind

            _weightageKind = (MultiWeightageKind)ctx.Reader.ReadInt32();
            Host.CheckDecode(Enum.IsDefined(typeof(MultiWeightageKind), _weightageKind));
        }
Esempio n. 2
0
 public MultiWeightedAverage(IHostEnvironment env, Options options)
     : base(env, LoaderSignature, options)
 {
     _weightageKind = options.WeightageName;
     Host.CheckUserArg(Enum.IsDefined(typeof(MultiWeightageKind), _weightageKind), nameof(options.WeightageName));
 }
Esempio n. 3
0
 public MultiWeightedAverage(IHostEnvironment env, Arguments args)
     : base(env, LoaderSignature, args)
 {
     _weightageKind = args.WeightageName;
     Host.CheckUserArg(Enum.IsDefined(typeof(MultiWeightageKind), _weightageKind), nameof(args.WeightageName));
 }