K00B404 commited on
Commit
b4d104d
·
verified ·
1 Parent(s): 07bf7e8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +31 -29
README.md CHANGED
@@ -1,31 +1,34 @@
1
  ---
2
- tags:
3
- - unet
4
- - pix2pix
5
- library_name: pytorch
6
- ---
7
-
8
- # Pix2Pix UNet Model
9
-
10
- ## Model Description
11
- Custom UNet model for Pix2Pix image translation.
12
- - Image Size: 256
13
- - Model Type: Small (256)
14
-
15
- ## Usage
16
-
17
- ```python
18
- import torch
19
- from small_256_model import UNet as small_UNet
20
- from big_1024_model import UNet as big_UNet
21
-
22
- # Load the model
23
- checkpoint = torch.load('model_weights.pth')
24
- model = big_UNet() if checkpoint['model_config']['big'] else small_UNet()
25
- model.load_state_dict(checkpoint['model_state_dict'])
26
- model.eval()
27
- Model Architecture
28
- UNet(
 
 
 
29
  (encoder): Sequential(
30
  (0): Conv2d(3, 64, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
31
  (1): ReLU(inplace=True)
@@ -42,5 +45,4 @@
42
  (4): ConvTranspose2d(64, 3, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
43
  (5): Tanh()
44
  )
45
- )
46
-
 
1
  ---
2
+ tags:
3
+ - unet
4
+ - pix2pix
5
+ - pytorch
6
+ library_name: pytorch
7
+ ---
8
+
9
+ # Pix2Pix UNet Model
10
+
11
+ ## Model Description
12
+ Custom UNet model for Pix2Pix image translation.
13
+ - **Image Size:** 256
14
+ - **Model Type:** Small (256)
15
+
16
+ ## Usage
17
+
18
+ ```python
19
+ import torch
20
+ from small_256_model import UNet as small_UNet
21
+ from big_1024_model import UNet as big_UNet
22
+
23
+ # Load the model
24
+ checkpoint = torch.load('model_weights.pth')
25
+ model = big_UNet() if checkpoint['model_config']['big'] else small_UNet()
26
+ model.load_state_dict(checkpoint['model_state_dict'])
27
+ model.eval()
28
+
29
+ Model Architecture
30
+
31
+ UNet(
32
  (encoder): Sequential(
33
  (0): Conv2d(3, 64, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
34
  (1): ReLU(inplace=True)
 
45
  (4): ConvTranspose2d(64, 3, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
46
  (5): Tanh()
47
  )
48
+ )