Я пишу программу, которая создает нейронные сети. В каждой нейронной сети будет 26 нейронов, соответствующих буквам алфавита.
Сейчас я застрял, пытаясь создать первый нейрон первого класса. Как только я получу возможность передавать информацию из параметров класса Neural_Network в параметры класса Neuron, я смогу создать несколько нейронных сетей, каждая со своим собственным набором заранее названных нейронов на основе атрибутов нейронной сети, к которой она принадлежит.
#Namecode for the main operation of the lobes and the main data stream
Main = "MAIN"
Main_Stream = "STRM"
Frontal = "FRNT"
Parietal = "PART"
Temporal = "TEMP"
Occipital = "OCCP"
#Namecode for the operations of the Frontal lobe
Problem_Solving = "ProbSolv"
Judgement = "Judge"
Personality = "Person"
Emotions = "Emote"
Speech = "Speech"
Motor_Function = "MotoFunc"
#Namecode for the operations of the Parietal lobe
Sensory = "Sense"
Spatial_Awareness = "SpatAware"
#Visual_Perception = "VisPercep"
Academic_Skills = "AcadSkill"
Math_Calculation = "MathCalc"
Reading_Writing = "ReadWrite"
#Namecode for the operations of the Temporal lobe
Language_Comprehension = "LangComp"
Organization_Sequence = "OrgSeq"
Information_Retrieval = "InfoRet"
Musical_Awareness = "MusicAware"
Memory = "Mem"
Hearing = "Hear"
Learning = "Learn"
Feeling = "Feel"
#Namecode for the operations of the Occipital lobe
Visual_Perception = "VisPercep"
Visual_Interpretation = "VisInter"
Reading = "Read"
#Namecode for the layers of each Operation
Observation = "OBS"
Analyzation = "AN"
Hypothesis = "HYP"
Execution = "EXEC"
Analyze_Results = "ANRES"
Record_Results = "REC"
def main():
class Neural_Network:
def __init__(self, name, lobe, operation, layer):
self.name = name
self.lobe = lobe
self.operation = operation
self.layer = layer
def show_Network_info(self):
print(f"{self.lobe}_{self.operation}_{self.layer}")
class Neuron:
pass
def __init__(self, name, lobe, operation, layer):
self.name = name
self.lobe = lobe
self.operation = operation
self.layer = layer
def show_Neuron_info(self):
print(f"{self.name}_{self.lobe}_{self.operation}_{self.layer}")
Neuron_A = Neuron(f"{self.name}_A", self.lobe, self.operation, self.layer)
FRNT_ProbSolv_OBS = Neural_Network("FRNT_ProbSolv_OBS", Frontal, Problem_Solving, Observation)
FRNT_ProbSolv_OBS.show_Network_info()
Подробнее здесь: https://stackoverflow.com/questions/798 ... en-classes