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)
158Parent.Option.NumberOfClasses = 1; 238NumberOfClasses = ctx.Reader.ReadInt32(),
NasBert\TextClassificationTrainer.cs (2)
161Parent.Option.NumberOfClasses = uniqueLabels.Count; 262NumberOfClasses = 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)
245var model = new ModelForPrediction(options, tokenizerModel.PadIndex, tokenizerModel.SymbolsCount, options.NumberOfClasses);
NasBert\TextClassificationTrainer.cs (2)
269var model = new ModelForPrediction(options, tokenizerModel.PadIndex, tokenizerModel.SymbolsCount, options.NumberOfClasses); 333var editor = VBufferEditor.Create(ref dst, Parent.Options.NumberOfClasses);
TorchSharpBaseTrainer.cs (1)
431ctx.Writer.Write(Options.NumberOfClasses);