# Path: hamaa/datasets/mnist/mnist_decoder.py
# def decode_idx3_ubyte(idx3_ubyte_file, num_data=-1):
# def decode_idx1_ubyte(idx1_ubyte_file, num_data=-1):
# def load_train_images(idx_ubyte_file=train_images_idx3_ubyte_file, num_data=-1):
# def load_train_labels(idx_ubyte_file=train_labels_idx1_ubyte_file, num_data=-1):
# def load_test_images(idx_ubyte_file=test_images_idx3_ubyte_file, num_data=-1):
# def load_test_labels(idx_ubyte_file=test_labels_idx1_ubyte_file, num_data=-1):
# def run():
# 
# Path: hamaa/utils/np_utils.py
# def to_one_hot(y, nb_class):
# def to_categorical(y):
# def split_training_data(data, nb_validation=None, split_ratio=None):
# def padding(images, pad_size):
# def rot180(images):
# def eval_numerical_gradient_array(f, x, df=None, verbose=False, h=1e-4):
# def sum_abs_err(u, v):


import gzip
import os
import urllib
import numpy as np
from PIL import Image
from .mnist import mnist_decoder
from ..utils import np_utils
# encoding: utf-8
"""
@author: monitor1379 
@contact: yy4f5da2@hotmail.com
@site: www.monitor1379.com

@version: 1.0
@license: GNU General Public License(Version 3)
@file: datasets.py
@time: 2016/9/11 9:00

数据集加载文件
"""





def load_or_data(one_hot=True):
    x = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
    y = np.array([0, 1, 1, 1])
    if one_hot:

# Path: hamaa/datasets/mnist/mnist_decoder.py
# def decode_idx3_ubyte(idx3_ubyte_file, num_data=-1):
# def decode_idx1_ubyte(idx1_ubyte_file, num_data=-1):
# def load_train_images(idx_ubyte_file=train_images_idx3_ubyte_file, num_data=-1):
# def load_train_labels(idx_ubyte_file=train_labels_idx1_ubyte_file, num_data=-1):
# def load_test_images(idx_ubyte_file=test_images_idx3_ubyte_file, num_data=-1):
# def load_test_labels(idx_ubyte_file=test_labels_idx1_ubyte_file, num_data=-1):
# def run():
# 
# Path: hamaa/utils/np_utils.py
# def to_one_hot(y, nb_class):
# def to_categorical(y):
# def split_training_data(data, nb_validation=None, split_ratio=None):
# def padding(images, pad_size):
# def rot180(images):
# def eval_numerical_gradient_array(f, x, df=None, verbose=False, h=1e-4):
# def sum_abs_err(u, v):


# Path: hamaa/datasets/datasets.py
import gzip
import os
import urllib
import numpy as np
from PIL import Image
from .mnist import mnist_decoder
from ..utils import np_utils

# encoding: utf-8
"""
@author: monitor1379 
@contact: yy4f5da2@hotmail.com
@site: www.monitor1379.com

@version: 1.0
@license: GNU General Public License(Version 3)
@file: datasets.py
@time: 2016/9/11 9:00

数据集加载文件
"""





def load_or_data(one_hot=True):
    x = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
    y = np.array([0, 1, 1, 1])
    if one_hot:

        y = np_utils.to_one_hot(y, 2)