run-youngjoo / SC-FEGAN

SC-FEGAN : Face Editing Generative Adversarial Network with User's Sketch and Color (ICCV2019)
Other
3.35k stars 530 forks source link

ValueError: Couldn't find 'checkpoint' file or checkpoints in given directory /home/mustafa/ckpt #30

Closed tomriddle54 closed 5 years ago

tomriddle54 commented 5 years ago

I have changed the yml file to CKPT_DIR: '/home/mustafa/ckpt' inside this dir there is model file SC-FEGAN.ckpt.data-00000-of-00001 and index file SC-FEGAN.ckpt.index error is

Model loaded from /home/mustafa/ckpt....start
Traceback (most recent call last):
  File "demo.py", line 234, in <module>
    ex = Ex(model, config)
  File "demo.py", line 22, in __init__
    self.model.load_demo_graph(config)
  File "/media/mustafa/ubuntu_backup/Projects/gan/SC-FEGAN/model.py", line 111, in load_demo_graph
    var_value = tf.contrib.framework.load_variable(ckpt_path, from_name)
  File "/home/mustafa/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/contrib/framework/python/framework/checkpoint_utils.py", line 79, in load_variable
    reader = load_checkpoint(checkpoint_dir)
  File "/home/mustafa/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/contrib/framework/python/framework/checkpoint_utils.py", line 62, in load_checkpoint
    "given directory %s" % filepattern)
ValueError: Couldn't find 'checkpoint' file or checkpoints in given directory /home/mustafa/ckpt
run-youngjoo commented 5 years ago

Make the './ckpt' dir in SC-FEGAN project folder plz.

MichealJl commented 5 years ago

Have you solved this problem

tomriddle54 commented 5 years ago

Yes I have solved this issue

MichealJl commented 5 years ago

Please tell me how you solved it.

tomriddle54 commented 5 years ago

I create ckpt dir and pasted the model files there

MichealJl commented 5 years ago

I am the CKPT directory created under the SC-FEGAN project, but I still report an error.

MichealJl commented 5 years ago

Can I see your demo.yaml?

tomriddle54 commented 5 years ago

you need to give SC-FEGAN.ckpt name on yaml here is my yaml

INPUT_SIZE: 512
BATCH_SIZE: 1

GPU_NUM: 1

# directories
CKPT_DIR: 'ckpt/SC-FEGAN.ckpt'
MichealJl commented 5 years ago

Thank you for your help. I think I've found the reason.

tomriddle54 commented 5 years ago

What was the reason write it down so this can help others

chenthefool commented 3 years ago

I have just solved this question. this is my filename: model.ckpt-100000.data-00000-of-00001 and shell command: python run pretraining --init_checkpoint=./ckpt/model.ckpt-100000
so, when you enter the file name, you just ignore the .data-00000-of-00001

JayJongyoul commented 3 years ago

Dooray! Failure Notice

    Failure Notice

    Your message sent to

@.*** has failed to be delivered.

      Please refer to the below for details.

        * Recipient : 

@.***

        * Sent time : 

2021-04-22T14:31:55

        * Subject : 

Re: [run-youngjoo/SC-FEGAN] ValueError: Couldn't find 'checkpoint' file or checkpoints in given directory /home/mustafa/ckpt (#30)

            * Remote host said : 

Requested action not taken: mailbox unavailable

      This message was sent from a notification-only address that cannot accept incoming email.
      For more information, please contact           ***@***.***

    © Dooray!.
gerwindekruijf commented 2 years ago

I fixed the error, your files should be called "model.ckpt.....", in my case it was something like "bert-model.ckpt" which does not work. It does not matter if there are other files, such as config.json, in your directory as long as the checkpoints are named "model.ckpt....."

JayJongyoul commented 2 years ago

Dooray! Failure Notice

    Failure Notice

    Your message sent to

@.*** has failed to be delivered.

      Please refer to the below for details.

        * Recipient : 

@.***

        * Sent time : 

2022-05-24T20:51:45

        * Subject : 

Re: [run-youngjoo/SC-FEGAN] ValueError: Couldn't find 'checkpoint' file or checkpoints in given directory /home/mustafa/ckpt (#30)

            * Remote host said : 

Requested action not taken: mailbox unavailable

      This message was sent from a notification-only address that cannot accept incoming email.
      For more information, please contact           ***@***.***

    © Dooray!.