Giter Club home page Giter Club logo

Comments (10)

JacksonL1 avatar JacksonL1 commented on May 27, 2024 2

modify 58 line of solver.py to

self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '100000_nets_ema.ckpt'), self.nets_ema)]

and modify init function of checkpoint.py

def init(self, fname_template, module_list):
os.makedirs(os.path.dirname(fname_template), exist_ok=True)
self.fname_template = fname_template
self.module_dict = module_list

It's work at Windows

from stargan-v2.

ZacHu-ZYH avatar ZacHu-ZYH commented on May 27, 2024 1

Replace all the '{:06d}' as '{06d}', it will work on Windows platform!

from stargan-v2.

youngjung avatar youngjung commented on May 27, 2024

We don't have an answer for Q1.
We tested our code on linux only.
Maybe someone else with windows experience could provide some help here.

Q2 is resolved in #3 .
Hope it helps.

from stargan-v2.

iampranav-ai avatar iampranav-ai commented on May 27, 2024

Getting the same issue in Windows 10 CMD
Error message:
Traceback (most recent call last):
File "main.py", line 182, in
main(args)
File "main.py", line 37, in main
solver = Solver(args)
File "C:\Users\xxx\stargan-v2\core\solver.py", line 58, in init
self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '{:06d}_nets_ema.ckpt'), **self.nets_ema)]
File "C:\Users\xxx\stargan-v2\core\checkpoint.py", line 17, in init
os.makedirs(os.path.dirname(fname_template), exist_ok=True)
File "C:\Users\xxx.conda\envs\stargan-v2\lib\os.py", line 220, in makedirs
mkdir(name, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: '{:'

from stargan-v2.

xiaochuangshu avatar xiaochuangshu commented on May 27, 2024

modify 58 line of solver.py to

self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '100000_nets_ema.ckpt'), self.nets_ema)]

and modify init function of checkpoint.py

def init(self, fname_template, module_list): os.makedirs(os.path.dirname(fname_template), exist_ok=True) self.fname_template = fname_template self.module_dict = module_list

It's work at Windows

Why does this error appear when I run it in windows after I modified it as you said?

Traceback (most recent call last):
File "main.py", line 21, in
from core.solver import Solver
File "E:\sxc\stargan-v2-master\core\solver.py", line 22, in
from core.checkpoint import CheckpointIO
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 15, in
class CheckpointIO(object):
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 24, in CheckpointIO
self.fname_template = fname_template
NameError: name 'fname_template' is not defined

(stargan-v2) E:\sxc\stargan-v2-master>python main.py --mode train --num_domains 1 --w_hpf 1 --lambda_reg 1 --lambda_sty 1 --lam
bda_ds 1 --lambda_cyc 1 --train_img_dir data/airplane/train --val_img_dir data/airplane/val
Traceback (most recent call last):
File "main.py", line 21, in
from core.solver import Solver
File "E:\sxc\stargan-v2-master\core\solver.py", line 22, in
from core.checkpoint import CheckpointIO
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 15, in
class CheckpointIO(object):
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 24, in CheckpointIO
self.fname_template = fname_template
NameError: name 'fname_template' is not defined

(stargan-v2) E:\sxc\stargan-v2-master>python main.py --mode train --num_domains 1 --w_hpf 1 --lambda_reg 1 --lambda_sty 1 --lam
bda_ds 1 --lambda_cyc 1 --train_img_dir data/airplane/train --val_img_dir data/airplane/val
Traceback (most recent call last):
File "main.py", line 21, in
from core.solver import Solver
File "E:\sxc\stargan-v2-master\core\solver.py", line 22, in
from core.checkpoint import CheckpointIO
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 15, in
class CheckpointIO(object):
File "E:\sxc\stargan-v2-master\core\checkpoint.py", line 24, in CheckpointIO
self.fname_template = fname_template
NameError: name 'fname_template' is not defined

from stargan-v2.

study3h avatar study3h commented on May 27, 2024

Q1: setup ffmpeg-4.4.1-essentials_build first, download from https://ffmpeg.org/download.html#build-windows;
then pip install ffmpeg-python, not ffmpeg.
this works for me.

from stargan-v2.

TongfanWei avatar TongfanWei commented on May 27, 2024

I tried your method. It passed the Q2, but brings a new problem:
AttributeError: 'CheckpointIO' object has no attribute 'data_parallel'

from stargan-v2.

jishulinbyte avatar jishulinbyte commented on May 27, 2024

remove checkpoint.py line 17 checkpoint.py .And create expr in the root directory, and create checkpoints under expr.

from stargan-v2.

srx123456 avatar srx123456 commented on May 27, 2024

Hello, how to download the dataset in the Chinese mainland and in the window environment, I encountered some problems when downloading the dataset:
download.sh: line 46: wget: command not found
unzip: cannot find or open ./data/afhq.zip, ./data/afhq.zip.zip or ./data/afhq.zip.ZIP.
rm: cannot remove './data/afhq.zip': No such file or directory

from stargan-v2.

ZacHu-ZYH avatar ZacHu-ZYH commented on May 27, 2024

modify 58 line of solver.py to

self.ckptios = [CheckpointIO(ospj(args.checkpoint_dir, '100000_nets_ema.ckpt'), self.nets_ema)]

and modify init function of checkpoint.py

def init(self, fname_template, module_list): os.makedirs(os.path.dirname(fname_template), exist_ok=True) self.fname_template = fname_template self.module_dict = module_list

It's work at Windows

I don't recommend doing this, because each saved model overwrites the last

from stargan-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.