/
SentenceSimilarityTrainer.xml
50 lines (46 loc) · 3.05 KB
/
SentenceSimilarityTrainer.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<Type Name="SentenceSimilarityTrainer" FullName="Microsoft.ML.TorchSharp.NasBert.SentenceSimilarityTrainer">
<TypeSignature Language="C#" Value="public class SentenceSimilarityTrainer : Microsoft.ML.TorchSharp.NasBert.NasBertTrainer<float,float>" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit SentenceSimilarityTrainer extends Microsoft.ML.TorchSharp.NasBert.NasBertTrainer`2<float32, float32>" />
<TypeSignature Language="DocId" Value="T:Microsoft.ML.TorchSharp.NasBert.SentenceSimilarityTrainer" />
<TypeSignature Language="VB.NET" Value="Public Class SentenceSimilarityTrainer
Inherits NasBertTrainer(Of Single, Single)" />
<TypeSignature Language="F#" Value="type SentenceSimilarityTrainer = class
 inherit NasBertTrainer<single, single>" />
<AssemblyInfo>
<AssemblyName>Microsoft.ML.TorchSharp</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.ML.TorchSharp.NasBert.NasBertTrainer<System.Single,System.Single></BaseTypeName>
<BaseTypeArguments>
<BaseTypeArgument TypeParamName="TLabelCol">System.Single</BaseTypeArgument>
<BaseTypeArgument TypeParamName="TTargetsCol">System.Single</BaseTypeArgument>
</BaseTypeArguments>
</Base>
<Interfaces />
<Docs>
<summary>
The <see cref="T:Microsoft.ML.IEstimator`1" /> for training a Deep Neural Network(DNN) to classify text.
</summary>
<remarks>
<format type="text/markdown"><![CDATA[
To create this trainer, use [TextClassification](xref:Microsoft.ML.TorchSharpCatalog.TextClassification(Microsoft.ML.MulticlassClassificationCatalog.MulticlassClassificationTrainers,Int32,System.String,System.String,System.String,System.String,Int32,Int32,Int32,Microsoft.ML.TorchSharp.NasBert.BertArchitecture,Microsoft.ML.IDataView)).
### Input and Output Columns
The input label column data must be type<xref:System.Single> type and the sentence columns must be of type<xref:Microsoft.ML.Data.TextDataViewType>.
This trainer outputs the following columns:
| Output Column Name | Column Type | Description|
| -- | -- | -- |
| `Score` | <xref:System.Single> | The degree of similarity between the 2 sentences. |
### Trainer Characteristics
| | |
| -- | -- |
| Machine learning task | Rregression |
| Is normalization required? | No |
| Is caching required? | No |
| Required NuGet in addition to Microsoft.ML | Microsoft.ML.TorchSharp and libtorch-cpu or libtorch-cuda-11.3 or any of the OS specific variants. |
| Exportable to ONNX | No |
### Training Algorithm Details
Trains a Deep Neural Network(DNN) by leveraging an existing pre-trained NAS-BERT roBERTa model for the purpose of determining sentence similarity.
]]></format>
</remarks>
</Docs>
<Members />
</Type>