In [4]:
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.examples.tutorials.mnist import input_data
import sys,os;
%matplotlib inline
sys.path.append("../");
from tf_data import *
In [5]:
train_dir = '../data/MNIST/';
mnist = input_data.read_data_sets(train_dir, one_hot=True);
noisy_mnist = MNISTData.NoisyLabels(train_dir, percent=0.50);
In [6]:
[m_x,m_y] = mnist.train.next_batch(batch_size=1000);
[n_x,n_y] = noisy_mnist.train.next_batch(batch_size=1000);
np.sum(1-np.alltrue(np.equal(m_y,n_y),axis=1)) #Result should be around 500
Out[6]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: