Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Image classification
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Azzouzi Widad
Image classification
Commits
022e1f73
Commit
022e1f73
authored
1 year ago
by
widad174
Browse files
Options
Downloads
Patches
Plain Diff
Update
parent
30ace205
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
__pycache__/mlp.cpython-311.pyc
+0
-0
0 additions, 0 deletions
__pycache__/mlp.cpython-311.pyc
main.py
+4
-4
4 additions, 4 deletions
main.py
mlp.py
+1
-1
1 addition, 1 deletion
mlp.py
resultats/mlp.png
+0
-0
0 additions, 0 deletions
resultats/mlp.png
resultats/mlp1.png
+0
-0
0 additions, 0 deletions
resultats/mlp1.png
with
5 additions
and
5 deletions
__pycache__/mlp.cpython-311.pyc
+
0
−
0
View file @
022e1f73
No preview for this file type
This diff is collapsed.
Click to expand it.
main.py
+
4
−
4
View file @
022e1f73
from
read_cifar
import
*
from
mlp
import
*
from
knn
import
*
#
from knn import *
path
=
r
'
C:\Users\hp\Desktop\BE\image-classification\data
'
'''
if __name__ ==
"
__main__
"
:
split_factor = 0.9
X, y = read_cifar(path)
...
...
@@ -18,7 +18,7 @@ if __name__ == "__main__":
'''
if
__name__
==
"
__main__
"
:
split_factor
=
0.9
data
,
labels
=
read_cifar
(
path
)
...
...
@@ -26,7 +26,7 @@ if __name__ == "__main__":
data_train
,
data_test
=
data_train
/
255.0
,
data_test
/
255.0
# parameters of the MLP :
d_h
=
64
learning_rate
=
0.
9
learning_rate
=
0.
1
num_epoch
=
100
train_accuracies
,
test_accuracy
=
run_mlp_training
(
data_train
,
labels_train
,
data_test
,
...
...
This diff is collapsed.
Click to expand it.
mlp.py
+
1
−
1
View file @
022e1f73
...
...
@@ -173,4 +173,4 @@ def plot_accuracy_versus_epoch(accuracies):
plt
.
xlabel
(
"
Epochs
"
)
plt
.
ylabel
(
"
Accuracy
"
)
plt
.
grid
(
axis
=
'
both
'
,
which
=
'
both
'
)
plt
.
savefig
(
r
'
C:\Users\hp\Desktop\BE\image-classification\resultats\mlp.png
'
)
\ No newline at end of file
plt
.
savefig
(
r
'
C:\Users\hp\Desktop\BE\image-classification\resultats\mlp1.png
'
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resultats/mlp.png
deleted
100644 → 0
+
0
−
0
View file @
30ace205
94.2 KiB
This diff is collapsed.
Click to expand it.
resultats/mlp1.png
0 → 100644
+
0
−
0
View file @
022e1f73
44.4 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment