1

尝试在 Google Colab 中使用 Derrick Schultz 的存储库进行 StyleGAN2 神经训练时出现此错误https://github.com/dvschultz/ai/blob/master/StyleGAN2_Colab_Train.ipynb

命令是:

!python run_generator.py generate-images --network=/content/drive/My\ Drive/stylegan2-colab-test/stylegan2/results/00002-stylegan2-birdaus-1gpu-config-f/submit_config.pkl --seeds=3875451-3876000 --truncation-psi=0.7

之前的一切都按照教程中的方式完成,但使用的是我自己的数据集。但后来我得到:

Local submit - run_dir: results/00006-generate-images
dnnlib: Running run_generator.generate_images() on localhost...
Loading networks from "/content/drive/My Drive/stylegan2-colab-test/stylegan2/results/00002-stylegan2-birdaus-1gpu-config-f/submit_config.pkl"...
Traceback (most recent call last):
  File "run_generator.py", line 490, in <module>
    main()
  File "run_generator.py", line 485, in main
    dnnlib.submit_run(sc, func_name_map[subcmd], **kwargs)
  File "/content/drive/My Drive/stylegan2-colab-test/stylegan2/dnnlib/submission/submit.py", line 343, in submit_run
    return farm.submit(submit_config, host_run_dir)
  File "/content/drive/My Drive/stylegan2-colab-test/stylegan2/dnnlib/submission/internal/local.py", line 22, in submit
    return run_wrapper(submit_config)
  File "/content/drive/My Drive/stylegan2-colab-test/stylegan2/dnnlib/submission/submit.py", line 280, in run_wrapper
    run_func_obj(**submit_config.run_func_kwargs)
  File "/content/drive/My Drive/stylegan2-colab-test/stylegan2/run_generator.py", line 120, in generate_images
    _G, _D, Gs = pretrained_networks.load_networks(network_pkl)
  File "/content/drive/My Drive/stylegan2-colab-test/stylegan2/pretrained_networks.py", line 76, in load_networks
    G, D, Gs = pickle.load(stream, encoding='latin1')
ValueError: too many values to unpack (expected 3)

此代码应该按原样工作,但事实并非如此。不幸的是,我自己不是编码员。这里需要改变什么?

4

0 回答 0