mirror of
https://github.com/guezoloic/neural-network.git
synced 2026-01-25 01:34:21 +00:00
fix(network.py): resolve E999 SyntaxError by separating the two strings
This commit is contained in:
@@ -77,12 +77,14 @@ class Neuron:
|
|||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
jmp: int = int(math.sqrt(self._input_size))
|
jmp: int = int(math.sqrt(self._input_size))
|
||||||
text: list[str] = []
|
text: list[str] = []
|
||||||
|
|
||||||
for i in range(0, self._input_size, jmp):
|
for i in range(0, self._input_size, jmp):
|
||||||
line: str = str.join("", str(self._weight[i: (i + jmp)]))
|
line: str = str.join("", str(self._weight[i: (i + jmp)]))
|
||||||
text.append(line)
|
text.append(line)
|
||||||
|
|
||||||
return f"weight:\n{str.join("\n", text)}\nbias: {self._bias}"
|
return "weight:\n" + str.join("\n", text) + f"\nbias: {self._bias}"
|
||||||
|
|
||||||
|
Neuron(10)
|
||||||
|
|
||||||
# # neuron class
|
# # neuron class
|
||||||
# class Neuron:
|
# class Neuron:
|
||||||
|
|||||||
Reference in New Issue
Block a user