Skip to content

resnet50-0676ba61.pth #181

@siyuehua

Description

@siyuehua

我应该如何在自己的环境中训练resnet,以获得适应于自己设置的环境的权重文件resnet50-0676ba61.pth。主要原因是,我在尝试运行训练代码的时候遇见了以下错误,在网上搜寻的原因是,resnet50-0676ba61.pth该权重文件不适应我目前配置的环境,需要重新训练。
(base) root@autodl-container-71fc468e9e-d11658bc:# cd Deep3DFaceRecon_pytorch
(base) root@autodl-container-71fc468e9e-d11658bc:
/Deep3DFaceRecon_pytorch# python train.py --name=train1 --gpu_ids=0
----------------- Options ---------------
add_image: True
batch_size: 32
batch_size_val: 32
bfm_folder: BFM
bfm_model: BFM_model_front.mat
camera_d: 10.0
center: 112.0
checkpoints_dir: ./checkpoints
continue_train: False
data_root: ./
dataset_mode: flist
ddp_port: 12355
display_freq: 1000
display_per_batch: True
epoch: latest
epoch_count: 1
eval_batch_nums: inf
evaluation_freq: 5000
flist: datalist/train/masks.txt
flist_val: datalist/val/masks.txt
focal: 1015.0
gpu_ids: 0
init_path: checkpoints/init_model/resnet50-0676ba61.pth
isTrain: True [default: None]
lr: 0.0001
lr_decay_epochs: 10
lr_policy: step
max_dataset_size: inf
model: facerecon
n_epochs: 20
name: train1 [default: face_recon]
net_recog: r50
net_recog_path: checkpoints/recog_model/ms1mv3_arcface_r50_fp16/backbone.pth
net_recon: resnet50
num_threads: 4
phase: train
preprocess: shift_scale_rot_flip
pretrained_name: None
print_freq: 100
rot_angle: 10.0
save_by_iter: False
save_epoch_freq: 1
save_latest_freq: 5000
scale_delta: 0.1
serial_batches: False
shift_pixs: 10.0
suffix:
use_aug: True
use_crop_face: True
use_ddp: False [default: True]
use_last_fc: False
use_opengl: True
use_predef_M: False
verbose: False
vis_batch_nums: 1
w_color: 1.92
w_exp: 0.8
w_feat: 0.2
w_gamma: 10.0
w_id: 1.0
w_lm: 0.0016
w_reflc: 5.0
w_reg: 0.0003
w_tex: 0.017
world_size: 1
z_far: 15.0
z_near: 5.0
----------------- End -------------------
rank 0 train dataset [FlistDataset] was created
rank 0 val dataset [FlistDataset] was created
loading init net_recon resnet50 from checkpoints/init_model/resnet50-0676ba61.pth
Traceback (most recent call last):
File "train.py", line 166, in
main(0, world_size, train_opt)
File "train.py", line 41, in main
model = create_model(train_opt) # create a model given train_opt.model and other options
File "/root/Deep3DFaceRecon_pytorch/models/init.py", line 65, in create_model
instance = model(opt)
File "/root/Deep3DFaceRecon_pytorch/models/facerecon_model.py", line 107, in init
self.net_recog = networks.define_net_recog(
File "/root/Deep3DFaceRecon_pytorch/models/networks.py", line 65, in define_net_recog
net = RecogNetWrapper(net_recog=net_recog, pretrained_path=pretrained_path)
File "/root/Deep3DFaceRecon_pytorch/models/networks.py", line 112, in init
state_dict = torch.load(pretrained_path, map_location='cpu')
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 705, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 242, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions