简体   繁体   English

使用神经网络转换数字系统

[英]Using a neural network to convert numeral systems

For starters.对于初学者。 I know a neural.network is overkill for this but I'm doing it that way for the meme value.我知道 neural.network 对此有点矫枉过正,但我这样做是为了模因价值。 With that out of the way.有了这个。

I'm trying to use a neural.network on either Tensorflow or Keras to solve the AoC day 25 2022.我正在尝试在 Tensorflow 或 Keras 上使用 neural.network 来解决 AoC day 25 2022。

The task is converting from integers to a made up numeral system and the other way around.任务是从整数转换为组成的数字系统,反之亦然。

This is an excerpt from the "training data":这是“训练数据”的摘录:

 Decimal          SNAFU
        1              1
        2              2
        3             1=
        4             1-
        5             10
        6             11
        7             12
        8             2=
        9             2-
       10             20
       15            1=0
       20            1-0
     2022         1=11-2
    12345        1-0---0
314159265  1121-1110-1=0

The task looks very similar to converting to and from Roman numerals but the only projects I've found doing that use CV and an image as input, not strings.该任务看起来与罗马数字之间的转换非常相似,但我发现唯一使用 CV 和图像作为输入而不是字符串的项目。

Honestly this is my first project using neural.network and I'd like to know where to start.老实说,这是我使用 neural.network 的第一个项目,我想知道从哪里开始。

Any insights on what model should I use?关于我应该使用什么 model 的任何见解?

A sequence to sequence model is probably the best option.对 model 进行排序的序列可能是最佳选择。 It can be done in Tensorflow using Attention:可以使用 Attention 在 Tensorflow 中完成:

Tensorflow attention tutorial Tensorflow关注教程

A very similar problem is translation to Roman numerals which is tackled in this example using MATLAB and the above approach一个非常相似的问题是转换为罗马数字, 在此示例中使用 MATLAB 和上述方法解决了这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM