誰かがこれが何を意味するのか説明してください。
背景: 「ネットワーク」はクラスであり、ニューラル ネットワーク オブジェクトを表します。そのコンストラクターには、次のようないくつかの入力が必要です。ノード、入力、出力、num_functions など。ただし、参照として使用している python 実装では、辞書を使用してこれらのパラメーターをコンストラクターにロードします (これが起こっていると思います)。これがnetwork(**config)でどのように機能するかを説明できる人はいますか? Ps。これをJavaに変換しています。
ネットワーク クラスのコンストラクタは次のようになります。
public network(int _graph_length, int _input_length, int _output_length, int _max_arity, int _function_length){
辞書はこれを行います:
output is a dictionary used to store data.
config is a dictionary uses to load parameters for the NN.
そして、私が理解していないコードは次のとおりです。
//Output data reset:
output.put("skipped", 0);
output.put("estimated", 0);
//if single mutation method:
if (config.get("speed") == "single"){
network.mutate = network.one_active_mutation;
}
parent = network(**config);
yield parent;
while true:
//code to evolve networks here!