from __future__ import print_function import numpy as np np.random.seed(1337) from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, Ma…
使用工具 :VS2013 + OpenCV 3.1 数据集:minst 训练数据:60000张 测试数据:10000张 输出模型:HOG_SVM_DATA.xml 数据准备 train-images-idx3-ubyte.gz: training set images (9912422 bytes) train-labels-idx1-ubyte.gz: training set labels (28881 bytes) t10k-images-idx3-ubyte.gz: test s…
import numpy as np from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, MaxPooling2D from keras.utils import np_utils # sklean接口的包装器K…
import torch import numpy as np import torch.nn as nn from torch.autograd import Variable import torch.optim as optim from torch.utils.data import DataLoader from torchvision import datasets, transforms batch_size = 64 learning_rate = 1e-2 num_epoche…