Code Monkey home page Code Monkey logo

Comments (5)

LukeALee avatar LukeALee commented on September 23, 2024 1

你好,已经实现了,具体的代码因为要用到某些工作上所以目前不太方便公开,实现的方式就是如之前我所说的,首先将代码中的result重新使用Orderdict的类型构建,自己编写一个函数生成bottleneck_values, 然后预测时使用该函数生成需要预测的图片的bottleneck_values,定义image_order_step = tf.arg_max(final_tensor, 1), 使用sess.run运行该tensor,其返回值就是在result列表中该图片所属分类的序号。

from tensorflow-tutorial.

LukeALee avatar LukeALee commented on September 23, 2024

使用第五章中的方法即可实现save与restore,但需要注意的是如果需要保存训练好的模型用于直接分类,每次重新巡行不能使用dict类型的result(即书中例子构造的的图片)而要使用Orderdict(即有序字典),否则每次lable的顺序不一致而导致下次用的时候预测的分类和ground_truth的分类不一致,那么正确率无论如何都会很低了

from tensorflow-tutorial.

j081mm avatar j081mm commented on September 23, 2024

请问书友是否已经实现了,在训练以后将整个模型保存并使用保存好的模型预测新的图片呢?

from tensorflow-tutorial.

LukeALee avatar LukeALee commented on September 23, 2024

至于保存和恢复的方式和书上说的并没有什么区别。

from tensorflow-tutorial.

j081mm avatar j081mm commented on September 23, 2024

谢谢

from tensorflow-tutorial.

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.