Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing the model #45

Open
Adriana618-Love opened this issue Jun 22, 2020 · 3 comments
Open

Testing the model #45

Adriana618-Love opened this issue Jun 22, 2020 · 3 comments

Comments

@Adriana618-Love
Copy link

Greetings, I wish you a good day. I have managed to train the network after many attempts but now I faced the challenge of testing it and apparently DCGAN does not have the test function, could you please provide this function?

@pminhtam
Copy link

    def test(self, config,input_images_fn_300W,input_masks_fn_300W):

        tx = np.random.random_integers(0, 32, size=config.batch_size)
        ty = np.random.random_integers(0, 32, size=config.batch_size)
        tf.global_variables_initializer().run()

        ffeed_dict = {self.input_images_fn_300W[0] : input_images_fn_300W,self.input_offset_height: tx, self.input_offset_width: ty,\
                     self.input_masks_fn_300W[0]:input_masks_fn_300W}
        img , texture,albedo,shade = self.sess.run([self.G_images_300W,self.texture_300W,self.albedo_300W, self.shade_300W], feed_dict=ffeed_dict)
        print(img , texture )
        return img , texture,albedo,shade

This is code i use to test model

@huyanfei-cqupt
Copy link

    def test(self, config,input_images_fn_300W,input_masks_fn_300W):

        tx = np.random.random_integers(0, 32, size=config.batch_size)
        ty = np.random.random_integers(0, 32, size=config.batch_size)
        tf.global_variables_initializer().run()

        ffeed_dict = {self.input_images_fn_300W[0] : input_images_fn_300W,self.input_offset_height: tx, self.input_offset_width: ty,\
                     self.input_masks_fn_300W[0]:input_masks_fn_300W}
        img , texture,albedo,shade = self.sess.run([self.G_images_300W,self.texture_300W,self.albedo_300W, self.shade_300W], feed_dict=ffeed_dict)
        print(img , texture )
        return img , texture,albedo,shade

This is code i use to test model

Hi,pminhtam. How to print the loss and various renderings generated? Can you share that code? Thank you

@cyjouc
Copy link

cyjouc commented Jan 20, 2021

    def test(self, config,input_images_fn_300W,input_masks_fn_300W):

        tx = np.random.random_integers(0, 32, size=config.batch_size)
        ty = np.random.random_integers(0, 32, size=config.batch_size)
        tf.global_variables_initializer().run()

        ffeed_dict = {self.input_images_fn_300W[0] : input_images_fn_300W,self.input_offset_height: tx, self.input_offset_width: ty,\
                     self.input_masks_fn_300W[0]:input_masks_fn_300W}
        img , texture,albedo,shade = self.sess.run([self.G_images_300W,self.texture_300W,self.albedo_300W, self.shade_300W], feed_dict=ffeed_dict)
        print(img , texture )
        return img , texture,albedo,shade

This is code i use to test model

Hi,pminhtam,Do you successfully compile the render_example.py?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants