CFCNet
CFCNet copied to clipboard
Pretained NYU error
I downloaded the pretrained nyu weights (500.pth), and edited line 138 of base_model.py to
state_dict = torch.load('.../500.pth', map_location=str(self.device))
When I run python evaluate.py --name nyu --checkpoints_dir ... --train_path ~/nyudepthv2/nyudepthv2/val/ --test_path ~/nyudepthv2/nyudepthv2/val/
I get:
batch_size: 16
checkpoints_dir: /home/haozhen/Downloads/500.pth [default: ./checkpoints]
continue_train: False
epoch: latest
epoch_count: 1
gpu_ids: 0
init_gain: 0.02
init_type: xavier
isTrain: False [default: None]
lr: 0.001
lr_decay_epochs: 100
lr_decay_iters: 5000000
lr_gamma: 0.9
lr_policy: lambda
max_dataset_size: inf
model: DCCA_sparse
momentum: 0.9
nP: 500
name: nyu [default: experiment_name]
niter: 400
no_flip: True
norm: instance
num_threads: 8
phase: train
print_freq: 1
resize_or_crop: none
save_epoch_freq: 1
seed: 0
serial_batches: False
suffix:
test_path: /home/haozhen/Documents/nyudepthv2/val [default: None]
train_path: /home/haozhen/Documents/nyudepthv2/val [default: None]
verbose: False
weight_decay: 0.0005
----------------- End ------------------- Found 654 images in val folder. #test images = 654 initialize network with xavier initialize network with xavier model [DCCASparseNetModel] was created loading the model from /home/haozhen/Downloads/500.pth/nyu/latest_net_DCCASparseNet.pth ---------- Networks initialized ------------- [Network DCCASparseNet] Total number of parameters : 40.417 M
torch.Size([1, 6, 224, 224]) torch.Size([1, 1, 224, 224])
Traceback (most recent call last):
File "/home/haozhen/codes/CFCNet/evaluate.py", line 99, in
I also encountered this problem, is it solved?
Hi, what is your shapes of "data" and "target" in line 97 of evaluation.py
@choyingw data.shape = torch.Size([1, 6, 224, 224]) target.shape = torch.Size([1, 1, 224, 224])