Coder Social home page Coder Social logo

Comments (6)

mprice64 avatar mprice64 commented on May 19, 2024 5

I found that specifying the checkpoint directory (minus any filename) as the input parameter worked with the new checkpoint format.

from fast-style-transfer.

jaume-ferrarons avatar jaume-ferrarons commented on May 19, 2024 2

I obtained the same error message when I was setting the --checkpoint parameter to any file of the checkpoint instead of pointing to the containing directory.

Hope it helps.

from fast-style-transfer.

petergerten avatar petergerten commented on May 19, 2024

After some googling I found this most likely related to Conchylicultor/DeepQA#23

from fast-style-transfer.

petergerten avatar petergerten commented on May 19, 2024

I do see the commit "update to support tensorflow 1.0.0" but it looks like nothing was changed regarding the checkpoint format.

from fast-style-transfer.

luke14free avatar luke14free commented on May 19, 2024

can confirm this, I will also try to look into it today. one solution is to downgrade to tf11 and go back to the commit previous to the one you mentioned

from fast-style-transfer.

luke14free avatar luke14free commented on May 19, 2024

@petergerten a simple workaround (although it raises a deprecation warning every time the checkpoint is created) is to apply the following edits:

@@ -133,7 +133,7 @@ def optimize(content_targets, style_target, content_weight, style_weight,
                     if slow:
                        _preds = vgg.unprocess(_preds)
                     else:
-                       saver = tf.train.Saver()
+                       saver = tf.train.Saver(write_version=tf.train.SaverDef.V1)
                        res = saver.save(sess, save_path)
                     yield(_preds, losses, iterations, epoch)

and

@@ -62,7 +62,7 @@ def from_pipe(opts):
         img_placeholder = tf.placeholder(tf.float32, shape=batch_shape,
                                          name='img_placeholder')
         preds = transform.net(img_placeholder)
-        saver = tf.train.Saver()
+        saver = tf.train.Saver(write_version=tf.train.SaverDef.V1)
         if os.path.isdir(opts.checkpoint):
             ckpt = tf.train.get_checkpoint_state(opts.checkpoint)
             if ckpt and ckpt.model_checkpoint_path:

from fast-style-transfer.

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.