Skip to content

Commit 00ea1ac

Browse files
committed
new parameter
1 parent 1530440 commit 00ea1ac

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

SinkhornGAN.ipynb

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@
2929
},
3030
{
3131
"cell_type": "code",
32-
"execution_count": 24,
32+
"execution_count": 26,
3333
"metadata": {},
3434
"outputs": [
3535
{
3636
"name": "stdout",
3737
"output_type": "stream",
3838
"text": [
39-
"Use cuda: False\n"
39+
"Use cuda: False\n",
40+
"hidden_size: 500\n",
41+
"z_size: 2\n",
42+
"batch_size: 200\n"
4043
]
4144
}
4245
],
@@ -50,12 +53,19 @@
5053
"use_cuda=torch.cuda.is_available()\n",
5154
"model_name='DC'\n",
5255
"model_name='MLP'\n",
53-
"print('Use cuda: %r'%use_cuda)"
56+
"if model_name=='DC':\n",
57+
" hidden_size=64\n",
58+
"if model_name=='MLP':\n",
59+
" hidden_size=500\n",
60+
"print('Use cuda: %r'%use_cuda)\n",
61+
"print('hidden_size: %d'%hidden_size)\n",
62+
"print('z_size: %d'%z_size)\n",
63+
"print('batch_size: %d'%batch_size)"
5464
]
5565
},
5666
{
5767
"cell_type": "code",
58-
"execution_count": 25,
68+
"execution_count": 27,
5969
"metadata": {
6070
"collapsed": true
6171
},
@@ -66,7 +76,6 @@
6676
" img_size=32\n",
6777
" image_chanel = 1\n",
6878
" epsilon=1.0\n",
69-
" hidden_size=256\n",
7079
" root = './data/mnist/'\n",
7180
" download = True\n",
7281
" trans = transforms.Compose([\n",

SinkhornGAN.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import os
2424

2525

26-
# In[24]:
26+
# In[26]:
2727

2828

2929
z_size=2
@@ -35,18 +35,24 @@
3535
use_cuda=torch.cuda.is_available()
3636
model_name='DC'
3737
model_name='MLP'
38+
if model_name=='DC':
39+
hidden_size=64
40+
if model_name=='MLP':
41+
hidden_size=500
3842
print('Use cuda: %r'%use_cuda)
43+
print('hidden_size: %d'%hidden_size)
44+
print('z_size: %d'%z_size)
45+
print('batch_size: %d'%batch_size)
3946

4047

41-
# In[25]:
48+
# In[27]:
4249

4350

4451
if dataset_name == 'MNIST':
4552
total_epoch=50000
4653
img_size=32
4754
image_chanel = 1
4855
epsilon=1.0
49-
hidden_size=256
5056
root = './data/mnist/'
5157
download = True
5258
trans = transforms.Compose([

0 commit comments

Comments
 (0)