Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13921

Custom Layer using Keras

$
0
0

I'm trying to build a generator for my GAN model to generate shapes that have to be similar to other pre existing shapes. I have a function that takes in input 18 parameters and then output the image. So what I'm trying to do is make the generator generate 18 parameters and the use that to generate the actual image that is going to be passed at the discriminator. I'm struggling to implement the function in the generator model using the custom Layer in Keras: in particular the 18 parameters are in tensor format and I'm not able convert it in a numpy 1D array to then pass it to the function to then obtain the result image. Any idea of the structure that my custom Layer has to have?

I tried tensor.numpy() to convert it but I doesn't work. I also tried other method to convert it but all of them gave me an error


Viewing all articles
Browse latest Browse all 13921

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>