hongyehu/RG-Flow

run "python main.py --data minst32" and return error

harrypotty18 opened this issue · 1 comments

Dear developers,
I used this code to test on Windows, however I got following message, after I run command " python main.py --data mnist32"

L = 32
batch_size = 64
clip_grad = 1
cuda =
data = mnist32
data_path = ./data
depth = 8
device = cpu
device_count = 1
dtype = float32
epoch = 500
keep_epoch = 10
kernel_size = 4
lr = 0.001
nchannels = 3
net_name = laplace_nl8,6,4,2_nr4_nm2_nh512
nhidden = 512
nhidden_list = [512, 512, 512, 512, 512, 512, 512, 512]
nlayers = 8,6,4,2
nlayers_list = [8, 8, 6, 6, 4, 4, 2, 2]
nmlp = 2
nmlp_list = [2, 2, 2, 2, 2, 2, 2, 2]
no_stdout = False
nresblocks = 4
nresblocks_list = [4, 4, 4, 4, 4, 4, 4, 4]
out_dir = ./saved_model
out_filename = ./saved_model\mnist32\laplace_nl8,6,4,2_nr4_nm2_nh512\out
out_infix =
plot_epoch = 1
plot_filename = ./saved_model\mnist32\laplace_nl8,6,4,2_nr4_nm2_nh512\epoch_sample
print_step = 1
prior = laplace
save_epoch = 1
subnet = rnvp
weight_decay = 5e-05

nparams in each RG layer: [20129536, 20129536, 15097152, 15097152, 10064768, 10064768, 5032384, 5032384]
Total nparams: 100647680
Traceback (most recent call last):
File "main.py", line 246, in
main()
File "main.py", line 182, in main
train_split, val_split, data_info = utils.load_dataset()
File "D:\Research Data\Coding\Python\RG-Flow-master\code\utils\data_utils.py", line 97, in load_dataset
assert data_info.channel == args.nchannels
AssertionError
(pytorch) PS D:\Research Data\Coding\Python\RG-Flow-master\code>

Hi, @harrypotty18 . Thanks for your interest in our work!

MNIST is a grayscale dataset, and you need to set --nchannels 1. (Sorry that we should have automatically set it.)