repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/conv2d.py
MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/conv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/batchnorm.py
MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True): if ((axes == [0,2,3]) or (axes == [0,2])) and fused==True: if axes==[0,2]: inputs = tf.expand_dims(inputs, 3) # Old...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/cond_batchnorm.py
MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/cond_batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True, labels=None, n_labels=None): """conditional batchnorm (dumoulin et al 2016) for BCHW conv filtermaps""" if axes != [0,2,3]: raise Ex...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/linear.py
MNISTtf/MNISTtf_old/conditional_continue/off_manifold/tflib/ops/linear.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def disable_default_weightnorm(): global _default_weightnorm _default_weightnorm = False _weights_stdev = None def set_wei...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/teacher_output_d.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/teacher_output_d.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_dat...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/cgan_super_g_d_two_class_unbalance_one_D.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/cgan_super_g_d_two_class_unbalance_one_D.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/teacher.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/teacher.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_data...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/cgan_mnist_knowledge_distillation_adaptor_step1.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/cgan_mnist_knowledge_distillation_adaptor_step1.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/cgan_super_g_d_two_class_unbalance_one_D_no_share_latent.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/cgan_super_g_d_two_class_unbalance_one_D_no_share_latent.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/lsun_label.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/lsun_label.py
from os import listdir import numpy as np import scipy.misc import time import pdb Label={'bedroom':0, 'kitchen':1, 'dining_room':2, 'conference_room':3, 'living_room':4, 'bridge':5, 'tower':6, 'classroom':7, 'church_outdoor':8, 'restaurant':9} def make_g...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/plot.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/plot.py
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import collections import time import cPickle as pickle _since_beginning = collections.defaultdict(lambda: {}) _since_last_flush = collections.defaultdict(lambda: {}) _iter = [0] def tick(): _iter[0] += 1 def plot(name, valu...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/mnist_step1.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/mnist_step1.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None, bias = None): images, targets = data if bias is not None : images = images[targets!=bias] targets = targets[targets!=bias]...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/mnist.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/mnist.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None, bias = None): images, targets = data if bias is not None : images = images[targets!=bias] targets = targets[targets!=bias]...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/__init__.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/__init__.py
import numpy as np import tensorflow as tf #import locale #locale.setlocale(locale.LC_ALL, '') _params = {} _param_aliases = {} def param(name, *args, **kwargs): """ A wrapper for `tf.Variable` which enables parameter sharing in models. Creates and returns theano shared variables similarly to `tf.Va...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/lsun.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/lsun.py
import numpy as np import scipy.misc import time import cv2 from os import listdir def make_generator(path, n_files, batch_size, image_size): epoch_count = [1] images_name = listdir(path) if n_files == 0: n_files = len(images_name) else: n_files = n_files def get_epoch(): ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/save_images.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/save_images.py
""" Image grid saver, based on color_grid_vis from github.com/Newmu """ import numpy as np import scipy.misc from scipy.misc import imsave def save_images(X, save_path): # [0, 1] -> [0,255] if isinstance(X.flatten()[0], np.floating): X = (255.99*X).astype('uint8') n_samples = X.shape[0] rows ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/mnist_mask_digit.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/mnist_mask_digit.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None): images, targets = data # if selecting_label is None: # rng_state = numpy.random.get_state() # numpy.random.shuffle(images) ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/layernorm.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/layernorm.py
import tflib as lib import numpy as np import tensorflow as tf def Layernorm(name, norm_axes, inputs): mean, var = tf.nn.moments(inputs, norm_axes, keep_dims=True) # Assume the 'neurons' axis is the first of norm_axes. This is the case for fully-connected and BCHW conv layers. n_neurons = inputs.get_shap...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/deconv2d.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/deconv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/__init__.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/__init__.py
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/conv1d.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/conv1d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def Conv1D(name, input_dim, output_dim, filter_size, inputs, he_init=True, mask_type=None, stride=1, weightnorm=None, biases=True, ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/conv2d.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/conv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/batchnorm.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True): if ((axes == [0,2,3]) or (axes == [0,2])) and fused==True: if axes==[0,2]: inputs = tf.expand_dims(inputs, 3) # Old...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/cond_batchnorm.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/cond_batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True, labels=None, n_labels=None): """conditional batchnorm (dumoulin et al 2016) for BCHW conv filtermaps""" if axes != [0,2,3]: raise Ex...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/linear.py
MNISTtf/MNISTtf_old/conditional_continue/on_manifold/tflib/ops/linear.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def disable_default_weightnorm(): global _default_weightnorm _default_weightnorm = False _weights_stdev = None def set_wei...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step4.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step4.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step2.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step2.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/teacher.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/teacher.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_data...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_baseline.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_baseline.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step1.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step1.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step3.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/gan_mnist_knowledge_distillation_adaptor_step3.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/lsun_label.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/lsun_label.py
from os import listdir import numpy as np import scipy.misc import time import pdb Label={'bedroom':0, 'kitchen':1, 'dining_room':2, 'conference_room':3, 'living_room':4, 'bridge':5, 'tower':6, 'classroom':7, 'church_outdoor':8, 'restaurant':9} def make_g...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/plot.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/plot.py
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import collections import time import cPickle as pickle _since_beginning = collections.defaultdict(lambda: {}) _since_last_flush = collections.defaultdict(lambda: {}) _iter = [0] def tick(): _iter[0] += 1 def plot(name, valu...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/mnist_step1.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/mnist_step1.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None, bias = None): images, targets = data if bias is not None : images = images[targets!=bias] targets = targets[targets!=bias]...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/mnist_step2.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/mnist_step2.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb import os from scipy.misc import imsave def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None): images, targets = data #for index, i in enumerate(targets): # if not os.path.exists('datase...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/mnist.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/mnist.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None, bias = None): images, targets = data if bias is not None : images = images[targets!=bias] targets = targets[targets!=bias]...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/__init__.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/__init__.py
import numpy as np import tensorflow as tf #import locale #locale.setlocale(locale.LC_ALL, '') _params = {} _param_aliases = {} def param(name, *args, **kwargs): """ A wrapper for `tf.Variable` which enables parameter sharing in models. Creates and returns theano shared variables similarly to `tf.Va...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/lsun.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/lsun.py
import numpy as np import scipy.misc import time import cv2 from os import listdir def make_generator(path, n_files, batch_size, image_size): epoch_count = [1] images_name = listdir(path) if n_files == 0: n_files = len(images_name) else: n_files = n_files def get_epoch(): ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/save_images.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/save_images.py
""" Image grid saver, based on color_grid_vis from github.com/Newmu """ import numpy as np import scipy.misc from scipy.misc import imsave def save_images(X, save_path): # [0, 1] -> [0,255] if isinstance(X.flatten()[0], np.floating): X = (255.99*X).astype('uint8') n_samples = X.shape[0] rows ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/layernorm.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/layernorm.py
import tflib as lib import numpy as np import tensorflow as tf def Layernorm(name, norm_axes, inputs): mean, var = tf.nn.moments(inputs, norm_axes, keep_dims=True) # Assume the 'neurons' axis is the first of norm_axes. This is the case for fully-connected and BCHW conv layers. n_neurons = inputs.get_shap...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/deconv2d.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/deconv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/__init__.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/__init__.py
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/conv1d.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/conv1d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def Conv1D(name, input_dim, output_dim, filter_size, inputs, he_init=True, mask_type=None, stride=1, weightnorm=None, biases=True, ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/conv2d.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/conv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/batchnorm.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True): if ((axes == [0,2,3]) or (axes == [0,2])) and fused==True: if axes==[0,2]: inputs = tf.expand_dims(inputs, 3) # Old...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/cond_batchnorm.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/cond_batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True, labels=None, n_labels=None): """conditional batchnorm (dumoulin et al 2016) for BCHW conv filtermaps""" if axes != [0,2,3]: raise Ex...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/linear.py
MNISTtf/MNISTtf_old/unconditioanal/off_manifold/tflib/ops/linear.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def disable_default_weightnorm(): global _default_weightnorm _default_weightnorm = False _weights_stdev = None def set_wei...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step4.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step4.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step2.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step2.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/teacher.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/teacher.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_data...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_baseline.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_baseline.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step1.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step1.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step3.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/gan_mnist_knowledge_distillation_adaptor_step3.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/lsun_label.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/lsun_label.py
from os import listdir import numpy as np import scipy.misc import time import pdb Label={'bedroom':0, 'kitchen':1, 'dining_room':2, 'conference_room':3, 'living_room':4, 'bridge':5, 'tower':6, 'classroom':7, 'church_outdoor':8, 'restaurant':9} def make_g...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/plot.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/plot.py
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import collections import time import cPickle as pickle _since_beginning = collections.defaultdict(lambda: {}) _since_last_flush = collections.defaultdict(lambda: {}) _iter = [0] def tick(): _iter[0] += 1 def plot(name, valu...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/mnist.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/mnist.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb import os from scipy.misc import imsave def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None): images, targets = data #for index, i in enumerate(targets): # if not os.path.exists('datase...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/__init__.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/__init__.py
import numpy as np import tensorflow as tf #import locale #locale.setlocale(locale.LC_ALL, '') _params = {} _param_aliases = {} def param(name, *args, **kwargs): """ A wrapper for `tf.Variable` which enables parameter sharing in models. Creates and returns theano shared variables similarly to `tf.Va...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/lsun.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/lsun.py
import numpy as np import scipy.misc import time import cv2 from os import listdir def make_generator(path, n_files, batch_size, image_size): epoch_count = [1] images_name = listdir(path) if n_files == 0: n_files = len(images_name) else: n_files = n_files def get_epoch(): ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/save_images.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/save_images.py
""" Image grid saver, based on color_grid_vis from github.com/Newmu """ import numpy as np import scipy.misc from scipy.misc import imsave def save_images(X, save_path): # [0, 1] -> [0,255] if isinstance(X.flatten()[0], np.floating): X = (255.99*X).astype('uint8') n_samples = X.shape[0] rows ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/layernorm.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/layernorm.py
import tflib as lib import numpy as np import tensorflow as tf def Layernorm(name, norm_axes, inputs): mean, var = tf.nn.moments(inputs, norm_axes, keep_dims=True) # Assume the 'neurons' axis is the first of norm_axes. This is the case for fully-connected and BCHW conv layers. n_neurons = inputs.get_shap...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/deconv2d.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/deconv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/__init__.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/__init__.py
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/conv1d.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/conv1d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def Conv1D(name, input_dim, output_dim, filter_size, inputs, he_init=True, mask_type=None, stride=1, weightnorm=None, biases=True, ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/conv2d.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/conv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/batchnorm.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True): if ((axes == [0,2,3]) or (axes == [0,2])) and fused==True: if axes==[0,2]: inputs = tf.expand_dims(inputs, 3) # Old...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/cond_batchnorm.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/cond_batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True, labels=None, n_labels=None): """conditional batchnorm (dumoulin et al 2016) for BCHW conv filtermaps""" if axes != [0,2,3]: raise Ex...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/linear.py
MNISTtf/MNISTtf_old/unconditioanal/on_manifold/tflib/ops/linear.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def disable_default_weightnorm(): global _default_weightnorm _default_weightnorm = False _weights_stdev = None def set_wei...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/useless.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/useless.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/teacher_output_d.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/teacher_output_d.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_dat...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/cgan_super_g_d_two_class_unbalance_one_D.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/cgan_super_g_d_two_class_unbalance_one_D.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/teacher.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/teacher.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_data...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/cgan_mnist_knowledge_distillation_adaptor_step1.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/cgan_mnist_knowledge_distillation_adaptor_step1.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/cgan_super_g_d_two_class_unbalance_one_D_no_share_latent.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/cgan_super_g_d_two_class_unbalance_one_D_no_share_latent.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/lsun_label.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/lsun_label.py
from os import listdir import numpy as np import scipy.misc import time import pdb Label={'bedroom':0, 'kitchen':1, 'dining_room':2, 'conference_room':3, 'living_room':4, 'bridge':5, 'tower':6, 'classroom':7, 'church_outdoor':8, 'restaurant':9} def make_g...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/plot.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/plot.py
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import collections import time import cPickle as pickle _since_beginning = collections.defaultdict(lambda: {}) _since_last_flush = collections.defaultdict(lambda: {}) _iter = [0] def tick(): _iter[0] += 1 def plot(name, valu...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist_step1.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist_step1.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None, bias = None): images, targets = data if bias is not None : images = images[targets!=bias] targets = targets[targets!=bias]...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist_step2.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist_step2.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb import os from scipy.misc import imsave def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None): images, targets = data #for index, i in enumerate(targets): # if not os.path.exists('datase...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None, bias = None): images, targets = data if bias is not None : images = images[targets!=bias] targets = targets[targets!=bias]...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/__init__.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/__init__.py
import numpy as np import tensorflow as tf #import locale #locale.setlocale(locale.LC_ALL, '') _params = {} _param_aliases = {} def param(name, *args, **kwargs): """ A wrapper for `tf.Variable` which enables parameter sharing in models. Creates and returns theano shared variables similarly to `tf.Va...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/lsun.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/lsun.py
import numpy as np import scipy.misc import time import cv2 from os import listdir def make_generator(path, n_files, batch_size, image_size): epoch_count = [1] images_name = listdir(path) if n_files == 0: n_files = len(images_name) else: n_files = n_files def get_epoch(): ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/save_images.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/save_images.py
""" Image grid saver, based on color_grid_vis from github.com/Newmu """ import numpy as np import scipy.misc from scipy.misc import imsave def save_images(X, save_path): # [0, 1] -> [0,255] if isinstance(X.flatten()[0], np.floating): X = (255.99*X).astype('uint8') n_samples = X.shape[0] rows ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist_mask_digit.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/mnist_mask_digit.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None): images, targets = data # if selecting_label is None: # rng_state = numpy.random.get_state() # numpy.random.shuffle(images) ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/layernorm.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/layernorm.py
import tflib as lib import numpy as np import tensorflow as tf def Layernorm(name, norm_axes, inputs): mean, var = tf.nn.moments(inputs, norm_axes, keep_dims=True) # Assume the 'neurons' axis is the first of norm_axes. This is the case for fully-connected and BCHW conv layers. n_neurons = inputs.get_shap...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/deconv2d.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/deconv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/__init__.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/__init__.py
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/conv1d.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/conv1d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def Conv1D(name, input_dim, output_dim, filter_size, inputs, he_init=True, mask_type=None, stride=1, weightnorm=None, biases=True, ...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/conv2d.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/conv2d.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True _weights_stdev = None def set_weights_stdev(weights_stdev): global _weights_stdev _weights_stdev = weights_stdev def unset...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/batchnorm.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True): if ((axes == [0,2,3]) or (axes == [0,2])) and fused==True: if axes==[0,2]: inputs = tf.expand_dims(inputs, 3) # Old...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/cond_batchnorm.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/cond_batchnorm.py
import tflib as lib import numpy as np import tensorflow as tf def Batchnorm(name, axes, inputs, is_training=None, stats_iter=None, update_moving_stats=True, fused=True, labels=None, n_labels=None): """conditional batchnorm (dumoulin et al 2016) for BCHW conv filtermaps""" if axes != [0,2,3]: raise Ex...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/linear.py
MNISTtf/MNISTtf_old/conditional_one_hot/off_manifold/tflib/ops/linear.py
import tflib as lib import numpy as np import tensorflow as tf _default_weightnorm = False def enable_default_weightnorm(): global _default_weightnorm _default_weightnorm = True def disable_default_weightnorm(): global _default_weightnorm _default_weightnorm = False _weights_stdev = None def set_wei...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/useless.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/useless.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/teacher_output_d.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/teacher_output_d.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_dat...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/cgan_super_g_d_two_class_unbalance_one_D.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/cgan_super_g_d_two_class_unbalance_one_D.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/teacher.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/teacher.py
import os, sys sys.path.append(os.getcwd()) import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.mnist import tflib.plot import pdb def teacher_model(noise, fake_data...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/cgan_mnist_knowledge_distillation_adaptor_step1.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/cgan_mnist_knowledge_distillation_adaptor_step1.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/cgan_super_g_d_two_class_unbalance_one_D_no_share_latent.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/cgan_super_g_d_two_class_unbalance_one_D_no_share_latent.py
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/lsun_label.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/lsun_label.py
from os import listdir import numpy as np import scipy.misc import time import pdb Label={'bedroom':0, 'kitchen':1, 'dining_room':2, 'conference_room':3, 'living_room':4, 'bridge':5, 'tower':6, 'classroom':7, 'church_outdoor':8, 'restaurant':9} def make_g...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/plot.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/plot.py
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import collections import time import cPickle as pickle _since_beginning = collections.defaultdict(lambda: {}) _since_last_flush = collections.defaultdict(lambda: {}) _iter = [0] def tick(): _iter[0] += 1 def plot(name, valu...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/mnist_step1.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/mnist_step1.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None, bias = None): images, targets = data if bias is not None : images = images[targets!=bias] targets = targets[targets!=bias]...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false
yaxingwang/MineGAN
https://github.com/yaxingwang/MineGAN/blob/a810f2d77f36ea9cf6993dede958b6f5d458f4b6/MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/mnist_step2.py
MNISTtf/MNISTtf_old/conditional_one_hot/miner/tflib/mnist_step2.py
import numpy import os import urllib import gzip import cPickle as pickle import pdb import os from scipy.misc import imsave def mnist_generator(data, batch_size, n_labelled, limit=None, selecting_label = None): images, targets = data #for index, i in enumerate(targets): # if not os.path.exists('datase...
python
MIT
a810f2d77f36ea9cf6993dede958b6f5d458f4b6
2026-01-05T07:08:28.063149Z
false