Giter Site home page Giter Site logo

Comments (3)

mgarbade avatar mgarbade commented on July 24, 2024

Ok, let's say it wasn't super hard :D.

def imread(path,c_dim):
    if c_dim == 3:
        im  = scipy.misc.imread(path, mode='RGB').astype(np.float)
    elif c_dim == 1:
        im  = scipy.misc.imread(path, mode='L').astype(np.float)
        im = np.expand_dims(im, 3)
    else:
        print('Error: c_dim must be either 3 or 1')
            
    return im

Sorry for the spamming ;)

from dcgan-completion.tensorflow.

bamos avatar bamos commented on July 24, 2024

:) Glad you figured it out.

-Brandon.

from dcgan-completion.tensorflow.

kplettl avatar kplettl commented on July 24, 2024

@mgarbade do you mind sharing how you were able to make the network work for 1 channel images? I'm new to tensorflow. I have made the modification to the imread function as you suggested but I still get an error about reshaping:
InvalidArgumentError: Cannot reshape a tensor with 786432 elements to shape [64,8,8,8,8,1] (262144 elements) for 'Reshape_1' (op: 'Reshape') with input shapes: [64,64,64,3], [6] and with input tensors computed as partial shapes: input[1] = [64,8,8,8,8,1].

Any advice you can offer would be wonderful!! Thanks!

from dcgan-completion.tensorflow.

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.