img/sottr2018-10-0121-49-tiitt.png)
[Six](https://abload.de/img/sottr2018-10-0212-52-zeduv.png)
[Adorable](https://abload.de/img/sottr2018-10-0212-57-zmefo.png)

Used Abload because imgur destroys the screenshots with compression.<reponame>DongHyun99/paper-implemention<filename>GAN/model(tensorflow).py
from typing import Generator
from google.protobuf import descriptor
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import Dense, LeakyReLU, Reshape, Input, Flatten
from tensorflow.python.keras.layers.normalization.batch_normalization import BatchNormalization
from tensorflow.keras.optimizers import Adam

import numpy as np

# defimne input latnet dimention & image shape
latent_dim = 10
img_shape = (28, 28, 3) # rows, cols, channels

# define Generator model 
def generator_model():

    model = Sequential()

    model.add(Dense(256, input_dim=latent_dim))
    model.add(LeakyReLU(alpha=0.2))
    model.add(BatchNormalization(momentum=0.8))
    model.add(Dense(512))
    model.add(LeakyReLU(alpha=0.2))
    model.add(BatchNormalization(momentum=0.8))
    model.add(Dense(1024))
    model.add(LeakyReLU(alpha=0.2))
    model.add(BatchNormalization(momentum=0.8))
    model.add(Dense(np.prod(img_shape), activation='tanh'))
    model.add(Reshape(img_shape))

    
    return model

def discriminator_model():

    model = Sequential()

    model.add(Flatten(input_shape=img_shape))
    model.add(Dense(512))
    model.add(LeakyReLU(alpha=0.2))
    model.add(Dense(256))
    model.add(LeakyReLU(alpha=0.2))
    model.add(Dense(1, activation='sigmoid'))

    return model

generator = generator_model()
discriminator = discriminator_model()
adam = Adam(lr=9.0002, beta_1=0.5)

discriminator.compile(loss = 'binary_crossentropy', optimizer=adam)

discriminator.trainalbe = False
gan_input = Input(shape=latent_dim)
x = generator(input=gan_input)
output = discriminator(x)

gan = Model(gan_input, output)

gan.summary()I think we all know at our core that too much TV is never a good thing. In fact, I’m sure most of us grew up being told that. However, as we grow into adulthood, and start facing the pressures of the “real world,” it’s pretty hard not to want to zone out with some TV at the end of the day.
Even though the desire for some serious relaxation tends to pull us to the couch, a study mentioned in The Happiness Advantage shares that people can genuinely only hold interest in watching TV for 30 minutes or so.
I presented this information to my husband Tom and while he was hesitant at first, we both realized, it’s usually about 20 minutes in then we want a snack, or we grab our phone. Really, the TV doesn’t hold our interest for that long.
A quick scan of the internet shocked me in that I see a lot of articles that center around people shaming those who don’t watch TV or even believe people are lying about not watching TV.
The truth is, 99% of households in America do have TVs, so I guess it makes sense that we doubt the 1%.
However, part of me can’t help but wonder if there is a little shame involved in cutting someone else down for claiming they don’t watch TV. After all, people love to go after successful people like Chip and Joanna Gaines when they state that they don’t own a TV or that they spend a lot of time with their kids.
I can’t help but wonder if seeing successful people like that makes some of us feel…small. We doubt our own capabilities and therefore put the blame on others who have shown us that being out-of-the-ordinary is actually possible.
Anyway, for those of you considering no longer being part of the “norm,” here are some ideas on how you can effectively cut down your TV time (or hell, maybe eliminate it altogether).
Having a timer set for our TV time is a genius idea in order to help us reduce the amount of time we spend watching it. Now you could set a timer on your phone, sure. But chances are that “snooze” button would get pretty tempting.
However, if you cut yourself off at the source by having the TV turn off after 1 hour, you are guaranteed to stick to a healthy time limit.
Again, in the book The Happiness Advantage, author Shawn Achor talks about how the best way to quit a bad habit is to make it hard to maintain that habit.
He uses his own example of reducing TV time by removing the batteries from the remote control and placing them down the hall in his desk drawer.
Sure, it only takes 30 seconds to get the batteries and put them back in, but a lot of times, that extra 30 seconds isn’t time we’re willing to put in.

Along with the fact that making bad habits harder to have is a wise choice, making good habits easier is just as helpful.
That’s why our family has started leaving games on the kitchen table like Scrabble, Bananagrams, Boggle, and Sumoku. In doing this, we have made it really easy to get distracted with a game instead and have even started playing games while we eat dinner.
This might sound odd, but not so long ago we were sitting and watching TV while we ate. Why not play a game together instead? It’s definitely more fun and we get some face-to-face time with our kids.
Ok, one more along those same lines. This one is especially good if you’ve removed the batteries from the remote.
Leave other distractions on the coffee table like magazines, books, games or crossword puzzles.
You’re already sitting down, you don’t want to go get the batteries, chances are, you’ll reach for something right within arms reach. You still get to relax but you can do it without the TV blaring.
If you know you tend to resort to TV time when you’re bored or when you don’t have anything else to do, plan something to do!
During our debt payoff journey, our family was forced to find so many free or affordable things to do in our area in order to save money.
The thing is, you don’t have to go for a run or visit a museum in order to plan another fun activity. Even taking the time to invite a friend (or your spouse) out for Happy Hour after work can be a great way to unwind while still socializing and getting some quality time in with someone you value.
Maybe you hate reading like I used to. I get that. However, if you have ever found a book you did like, try to find similar books on the shelves and give one of them a try.
Then, let yourself be lead by books.
What I have found is that when you read a book the author will mention a different book or another author will write a review for the book you are currentlty reading.
As you start to read more, you’ll find it becomes easier and easier to be lead to different books. This is kind of like finding a new series to binge watch. If you can do that with Netflix, I’m sure you can do that with books too.
I know some people who are highly productive individuals that just like the sound of the TV on. It’s comforting for them. For me, soon after I had kids, I began to detest the sound of the TV. There was just too much stimulation and noise for my taste.
However, if you like that comforting sound of the TV on but don’t want to keep getting caught up with the screen, try opting for a podcast or an Audiobook. A lot of times Audible has great promotions that are super affordable! 10 Easy Ways to Start Consuming More Books.
Maybe you don’t mind gathering together to watch TV with the whole family, but you don’t like falling asleep to it every night.
One great way to cut back TV time is to have less of them.
Not only has eliminating TV from the bedroom proven to be romantically beneficial (insert eyebrow raise), but it can lead to better sleep as well.
For our family, I really think the turning point for TV was spending more time hiking. However, I get that not everyone wants to sleep in their minivan and spend their days on the hiking trails. Fair