Giter Site home page Giter Site logo

Model load issue 2 about tensornets HOT 2 CLOSED

taehoonlee avatar taehoonlee commented on August 23, 2024
Model load issue 2

from tensornets.

Comments (2)

miha-skalic avatar miha-skalic commented on August 23, 2024

Adding with device helps in this case:

with tf.device('gpu:0'):
    inputs = tf.placeholder(tf.float32, [None, 224, 224, 3])
    outputs = tf.placeholder(tf.float32, [None, 50])
    model = nets.Inception4(inputs, is_training=True, classes=50)

however another error follows. It looks like the model wants to assign old FC-1000 to new FC-50.

ValueError: Dimension 1 in both shapes must be equal, but are 50 and 1000 for 'Assign_596' (op: 'Assign') with input shapes: [1536,50], [1536,1000].

from tensornets.

taehoonlee avatar taehoonlee commented on August 23, 2024

The first error raised because of attempts to restore all the global variables when weights for `tf.train.Optimizer` are additionally declared.
The second one caused by the size mismatch in the last layer.
Thank you for reporting the issue again @miha-skalic, please see the updates for the procedure of assigning weights!

from tensornets.

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.