6 writes to NumberOfClasses
Microsoft.ML.TorchSharp (6)
NasBert\NerTrainer.cs (2)
225Parent.Option.NumberOfClasses = keys.Length + 1; 325NumberOfClasses = ctx.Reader.ReadInt32(),
NasBert\SentenceSimilarityTrainer.cs (2)
157Parent.Option.NumberOfClasses = 1; 237NumberOfClasses = ctx.Reader.ReadInt32(),
NasBert\TextClassificationTrainer.cs (2)
160Parent.Option.NumberOfClasses = uniqueLabels.Count; 261NumberOfClasses = ctx.Reader.ReadInt32(),
10 references to NumberOfClasses
Microsoft.ML.TorchSharp (10)
NasBert\NasBertTrainer.cs (5)
208model = new NerModel(Parent.BertOptions, tokenizerModel.PadIndex, tokenizerModel.SymbolsCount, Parent.Option.NumberOfClasses); 210model = new ModelForPrediction(Parent.BertOptions, tokenizerModel.PadIndex, tokenizerModel.SymbolsCount, Parent.Option.NumberOfClasses); 534info[0] = new DataViewSchema.DetachedColumn(Parent.Options.PredictionColumnName, new KeyDataViewType(typeof(uint), Parent.Options.NumberOfClasses), labelBuilder.ToAnnotations()); 536info[1] = new DataViewSchema.DetachedColumn(Parent.Options.ScoreColumnName, new VectorDataViewType(NumberDataViewType.Single, Parent.Options.NumberOfClasses), meta.ToAnnotations()); 548info[0] = new DataViewSchema.DetachedColumn(Parent.Options.PredictionColumnName, new VectorDataViewType(new KeyDataViewType(typeof(uint), Parent.Options.NumberOfClasses - 1)), labelBuilder.ToAnnotations());
NasBert\NerTrainer.cs (1)
332var model = new NerModel(options, tokenizerModel.PadIndex, tokenizerModel.SymbolsCount, options.NumberOfClasses);
NasBert\SentenceSimilarityTrainer.cs (1)
244var model = new ModelForPrediction(options, tokenizerModel.PadIndex, tokenizerModel.SymbolsCount, options.NumberOfClasses);
NasBert\TextClassificationTrainer.cs (2)
268var model = new ModelForPrediction(options, tokenizerModel.PadIndex, tokenizerModel.SymbolsCount, options.NumberOfClasses); 332var editor = VBufferEditor.Create(ref dst, Parent.Options.NumberOfClasses);
TorchSharpBaseTrainer.cs (1)
431ctx.Writer.Write(Options.NumberOfClasses);