Coder Social home page Coder Social logo

keras-progressive_growing_of_gans's People

Contributors

naykun avatar somedaywilldo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

keras-progressive_growing_of_gans's Issues

UnboundLocalError: local variable 'p' referenced before assignment

When I am trying to run
python h5tool.py create_celeba_channel_last face_dataset.h5 /home/uzzal/dataset/celeba/img_align_celeba

I got this error --
Traceback (most recent call last): File "h5tool.py", line 259, in <module> execute_cmdline(sys.argv) File "h5tool.py", line 241, in execute_cmdline p.add_argument( 'h5_filename', help='HDF5 file to inspect') UnboundLocalError: local variable 'p' referenced before assignment

wrong implementation of WScale Layer

you just statically initialize scaled weight. But scale should be done in runtime

my correct impl based on original repo:

class WScaleConv2DLayer(KL.Conv2D):
    def __init__(self, *args, **kwargs):               
        kwargs['kernel_initializer'] = keras.initializers.random_normal()
        
        super(WScaleConv2DLayer,self).__init__(*args,**kwargs)
    def build(self, input_shape):
        super().build(input_shape)
        kernel_shape = K.int_shape(self.kernel)
        std = np.sqrt(2) / np.sqrt( np.prod(kernel_shape[:-1]) )
        self.wscale = K.constant(std, dtype=K.floatx() )
    def call(self, input, **kwargs):
        k = self.kernel                        
        self.kernel = self.kernel*self.wscale
        x = super().call(input,**kwargs)
        self.kernel = k                        
        return x

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.