Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gan-diffusion
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
Benyahia Mohammed Oussama
gan-diffusion
Commits
27903bcb
Commit
27903bcb
authored
1 month ago
by
Benyahia Mohammed Oussama
Browse files
Options
Downloads
Patches
Plain Diff
Edit README.md
parent
181420b4
Branches
main
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+114
-108
114 additions, 108 deletions
README.md
with
114 additions
and
108 deletions
README.md
+
114
−
108
View file @
27903bcb
...
@@ -71,6 +71,10 @@ To enhance image generation and reduce ambiguities between similar digits (e.g.,
...
@@ -71,6 +71,10 @@ To enhance image generation and reduce ambiguities between similar digits (e.g.,
-
[
DCGAN Tutorial
](
https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html
)
-
[
DCGAN Tutorial
](
https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html
)
-
[
MNIST Dataset
](
https://pytorch.org/vision/stable/generated/torchvision.datasets.MNIST.html#torchvision.datasets.MNIST
)
-
[
MNIST Dataset
](
https://pytorch.org/vision/stable/generated/torchvision.datasets.MNIST.html#torchvision.datasets.MNIST
)
Here is the corrected version with only the necessary adjustments:
---
## Part 2: Conditional GAN (cGAN) with U-Net
## Part 2: Conditional GAN (cGAN) with U-Net
### **Generator**
### **Generator**
...
@@ -88,11 +92,10 @@ The encoder takes a colored picture (3 channels: RGB), processes it through a se
...
@@ -88,11 +92,10 @@ The encoder takes a colored picture (3 channels: RGB), processes it through a se


### **Question:**
### **Question:**
Knowing that the input and output images have a shape of 256x256 with 3 channels, what will be the dimension of the feature map "x8"?
Knowing that the input and output images have a shape of 256x256 with 3 channels, what will be the dimension of the feature map "x8"?
**Answer:**
The dimension of the feature map x8 is
**[numBatch, 512,
1, 1
]**
.
**Answer:**
The dimension of the feature map x8 is
**[numBatch, 512,
32, 32
]**
.
### **Question:**
### **Question:**
Why are skip connections important in the U-Net architecture?
Why are skip connections important in the U-Net architecture?
...
@@ -126,40 +129,43 @@ For this project, we use a **70×70 PatchGAN**.
...
@@ -126,40 +129,43 @@ For this project, we use a **70×70 PatchGAN**.


question : how many learnable parameters this neural network has ?:
### **Question:**
How many learnable parameters does this neural network have?
1.
conv1:
1.
**
conv1:
**
-
Input channels: 6
-
Input channels: 6
-
Output channels: 64
-
Output channels: 64
-
Kernel size: 4
*
4
-
Kernel size: 4×4
-
Parameters in conv1 = (4×4×6+1(bais))×64=6208
-
Parameters in conv1 = (4×4×6+1(bias))×64 =
**6208**
2.
**conv2:**
-
Weights: 4 × 4 × 64 × 128 =
**131072**
-
Biases:
**128**
-
BatchNorm: (scale + shift) for 128 channels: 2 × 128 =
**256**
-
Parameters in conv2:
**131072 + 128 + 256 = 131456**
2
.
conv
2:
3
.
**
conv
3:**
-
Weights: 4 × 4 ×
64 × 128 = 131072
-
Weights: 4 × 4 ×
128 × 256 =
**524288**
-
Biases:
128
-
Biases:
**256**
-
BatchNorm: (scale + shift) for
128
channels: 2 ×
128 = 256
-
BatchNorm: (scale + shift) for
256
channels: 2 ×
256 =
**512**
-
Parameters
in
conv
2
:
131072 + 128 + 256 = 131456
-
Parameters
in
conv
3
:
**524288 + 256 + 512 = 525056**
3
.
conv
3:
4
.
**
conv
4:**
-
Weights: 4 × 4 ×
128 × 256 = 524288
-
Weights: 4 × 4 ×
256 × 512 =
**2097152**
-
Biases:
256
-
Biases:
**512**
-
BatchNorm: (scale + shift) for
256
channels: 2 ×
256 = 512
-
BatchNorm: (scale + shift) for
512
channels: 2 ×
512 =
**1024**
-
Parameters
in
conv
3
:
524288 + 256 + 512= 525056
-
Parameters
in
conv
4
:
**2097152 + 512 + 1024 = 2098688**
4.
conv4:
5.
**out:**
-
Weights: 4 × 4 × 256 × 512 = 2097152
-
Weights: 4 × 4 × 512 × 1 =
**8192**
-
Biases: 512
-
Biases:
**1**
-
BatchNorm: (scale + shift) for 512 channels: 2 × 512 = 1024
-
Parameters in out:
**8192 + 1 = 8193**
-
Parameters in conv4: 2097152+512+1,024=2098688
5.
out:
**Total Learnable Parameters:**
-
Weights: 4 × 4 × 512 × 1 = 8192
-
Biases: 1
-
Parameters in out: 8192 + 1=8193
**
Total Learnable Parameters**
**
6208 + 131456 + 525056 + 2098688 + 8193 = 2,769,601**
**6,208 + 131,456 + 525,056 + 2,098,688 + 8,193 = 2,769,601**
---
### **Results Comparison: 100 vs. 200 Epochs**
### **Results Comparison: 100 vs. 200 Epochs**
...
@@ -186,10 +192,10 @@ question : how many learnable parameters this neural network has ?:
...
@@ -186,10 +192,10 @@ question : how many learnable parameters this neural network has ?:
-
**Overfitting Issue:**
Generalization is poor beyond 100 epochs.
-
**Overfitting Issue:**
Generalization is poor beyond 100 epochs.
-
**Limited Dataset Size (378 Images):**
Restricts model’s diversity and quality.
-
**Limited Dataset Size (378 Images):**
Restricts model’s diversity and quality.
#### Example image of training set at 100 and 200 epochs:
####
**
Example image of training set at 100 and 200 epochs:
**


#### Example images of evaluation set at 100 and 200 epochs:
####
**
Example images of evaluation set at 100 and 200 epochs:
**


## Part 3: Diffusion Models
## Part 3: Diffusion Models
...
...
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