C# и библиотеки из python
Есть ли у C# библиотека которой можно тоже самое воспроизвести?
from tensorflow import keras
from tensorflow.keras import layers
Функции которые нужно воспроизвести
char_to_num = layers.StringLookup(
vocabulary=list(characters), mask_token=None
)
num_to_char = layers.StringLookup(
vocabulary=char_to_num.get_vocabulary(), mask_token=None, invert=True
)
def decode_batch_predictions(pred):
input_len = np.ones(pred.shape[0]) * pred.shape[1]
results = keras.backend.ctc_decode(pred, input_length=input_len, greedy=True)[0][0][:, :max_length]
output_text = []
for res in results:
res = tf.strings.reduce_join(num_to_char(res)).numpy().decode("utf-8")
output_text.append(res)
return output_text
Источник: Stack Overflow на русском