public void GetInputer(string Type, string Name, object Value) { CachePool.I().GetObject("Prefabs/Content/" + Type, (obj) => { obj.transform.SetParent(ContentParent, false); Inputer inputer = obj.GetComponent <Inputer>(); inputer.SetLabel(Name); inputer.SetValue(Value); BaseInputer.Add(Name, inputer); }); }
private void construct(NeuronData[][] neurons) { Inputer bias_inputer = new Inputer(); bias_inputer.value = 1; bias = new Neuron(new Neuron.activation_functions.activation_function_type(bias_inputer.call)); layers = new Neuron[neurons.Length][]; //the first layer inputers = new Inputer[neurons[0].Length]; layers[0] = new Neuron[inputers.Length]; for (int j = 0; j < inputers.Length; j++) { inputers[j] = new Inputer(); Neuron neuron = new Neuron(new Neuron.activation_functions.activation_function_type(inputers[j].call)); layers[0][j] = neuron; neuron.children_count = Convert.ToUInt32(neurons[1].Length); } //rest of layers uint children_count = 0; for (int i = 1; i < neurons.Length; i++) { layers[i] = new Neuron[neurons[i].Length]; if (i + 1 < neurons.Length) { children_count = Convert.ToUInt32(neurons[i + 1].Length); } else { children_count = 0; } for (int j = 0; j < neurons[i].Length; j++) { Neuron neuron = new Neuron(); layers[i][j] = neuron; neuron.children_count = children_count; for (int k = 0; k < neurons[i - 1].Length; k++) { neuron.add_parent(layers[i - 1][k], neurons[i][j].weights[k]); } neuron.add_parent(bias, 1); } } }
public void Init() { _inputer = new Inputer(".xsd"); }