mirror of
https://forge.apps.education.fr/phroy/mes-scripts-de-ml.git
synced 2024-01-27 11:30:36 +01:00
Ajout du perceptron multi-couches
This commit is contained in:
parent
ff0b9052c5
commit
8e7c1f55dd
@ -159,14 +159,14 @@ z3_pmc_xor = pmc_xor(x1_mg, x2_mg, activation=tanh)
|
|||||||
z4_pmc_xor = pmc_xor(x1_mg, x2_mg, activation=relu)
|
z4_pmc_xor = pmc_xor(x1_mg, x2_mg, activation=relu)
|
||||||
|
|
||||||
pmc_xor_echelon_ax = fig.add_subplot(2,4,3)
|
pmc_xor_echelon_ax = fig.add_subplot(2,4,3)
|
||||||
pmc_xor_echelon_ax.set_title("Xor PMC par Échelon")
|
pmc_xor_echelon_ax.set_title("XOR PMC par Échelon")
|
||||||
pmc_xor_echelon_ax.contourf(x1_mg, x2_mg, z1_pmc_xor)
|
pmc_xor_echelon_ax.contourf(x1_mg, x2_mg, z1_pmc_xor)
|
||||||
pmc_xor_echelon_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
pmc_xor_echelon_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
||||||
pmc_xor_echelon_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
pmc_xor_echelon_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
||||||
pmc_xor_echelon_ax.grid(True)
|
pmc_xor_echelon_ax.grid(True)
|
||||||
|
|
||||||
pmc_xor_sigmoid_ax = fig.add_subplot(2,4,4)
|
pmc_xor_sigmoid_ax = fig.add_subplot(2,4,4)
|
||||||
pmc_xor_sigmoid_ax.set_title("Xor PMC par Sigmoïde")
|
pmc_xor_sigmoid_ax.set_title("XOR PMC par Sigmoïde")
|
||||||
pmc_xor_sigmoid_ax.contourf(x1_mg, x2_mg, z2_pmc_xor)
|
pmc_xor_sigmoid_ax.contourf(x1_mg, x2_mg, z2_pmc_xor)
|
||||||
pmc_xor_sigmoid_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
pmc_xor_sigmoid_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
||||||
pmc_xor_sigmoid_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
pmc_xor_sigmoid_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
||||||
@ -177,14 +177,14 @@ pmc_xor_tanh_ax.contourf(x1_mg, x2_mg, z3_pmc_xor)
|
|||||||
pmc_xor_tanh_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
pmc_xor_tanh_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
||||||
pmc_xor_tanh_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
pmc_xor_tanh_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
||||||
pmc_xor_tanh_ax.grid(True)
|
pmc_xor_tanh_ax.grid(True)
|
||||||
pmc_xor_tanh_ax.set_xlabel("Xor PMC par Tanh", fontsize=12)
|
pmc_xor_tanh_ax.set_xlabel("XOR PMC par Tanh", fontsize=12)
|
||||||
|
|
||||||
pmc_xor_relu_ax = fig.add_subplot(2,4,8)
|
pmc_xor_relu_ax = fig.add_subplot(2,4,8)
|
||||||
pmc_xor_relu_ax.contourf(x1_mg, x2_mg, z4_pmc_xor)
|
pmc_xor_relu_ax.contourf(x1_mg, x2_mg, z4_pmc_xor)
|
||||||
pmc_xor_relu_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
pmc_xor_relu_ax.plot([0, 1], [0, 1], "rs", markersize=15)
|
||||||
pmc_xor_relu_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
pmc_xor_relu_ax.plot([0, 1], [1, 0], "g^", markersize=15)
|
||||||
pmc_xor_relu_ax.grid(True)
|
pmc_xor_relu_ax.grid(True)
|
||||||
pmc_xor_relu_ax.set_xlabel("Xor PMC par ReLU", fontsize=12)
|
pmc_xor_relu_ax.set_xlabel("XOR PMC par ReLU", fontsize=12)
|
||||||
|
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 535 KiB After Width: | Height: | Size: 536 KiB |
Loading…
Reference in New Issue
Block a user