fwaris / BertTorchSharp

.Net interactive notebook to show how to create a BERT model in TorchSharp; load pre-trained weights; and retrain it for text classification
9 stars 2 forks source link

麻烦作者出一个C#版的 #1

Open wormhole2019 opened 2 years ago

fwaris commented 2 years ago

Most of the OOP code should be easily translatable to C#. The BERT model is written in an object-oriented manner for simple translation of names in BERT weight tensors to the PyTorch / TorchSharp model.

The rest of the code is done in functional programming style (e.g. pattern matching) this should also be portable to the latest version of C# that supports top-level methods and pattern matching.

For other idioms please see: https://onedrive.live.com/view.aspx?resid=27A6504DB3E5D878!2856&ithint=file%2cpptx&app=PowerPoint&authkey=!AIHXqJm-OK9LjKo