Skip to content

Implementing weight clipping #1

@PatrykChrabaszcz

Description

@PatrykChrabaszcz

In tensorflow I just do this for weights clipping:

t_vars = tf.trainable_variables()
critic_vars = [var for var in t_vars if 'crit' in var.name]
self.clip_critic = []
for var in critic_vars:
self.clip_critic.append(tf.assign(var, tf.clip_by_value(var, -0.1, 0.1)))

Here is my repo where I try to implement WGAN: https://github.com/PatrykChrabaszcz/WGan
Did you get any good results ?
This is what I get for mnist:
res_20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions