本文整理汇总了Python中Helper.Helper.load_data方法的典型用法代码示例。如果您正苦于以下问题:Python Helper.load_data方法的具体用法?Python Helper.load_data怎么用?Python Helper.load_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helper.Helper
的用法示例。
在下文中一共展示了Helper.load_data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Graph
# 需要导入模块: from Helper import Helper [as 别名]
# 或者: from Helper.Helper import load_data [as 别名]
batch_size = 100
nb_classes = 2
nb_epoch = 80
data_augmentation = False
# input image dimensions
img_rows, img_cols = 64, 64
img_channels = 3
train_path = "/scratch/basag/train_data/"
test_path = "/scratch/basag/test_data/"
train_labels_path = "/scratch/basag/train_labels.csv"
test_labels_path = "/scratch/basag/test_labels.csv"
X_train, Y_train, X_test, Y_test = Helper.load_data(train_path, train_labels_path, test_path, test_labels_path)
# convert class vectors to binary class matrices
#Y_train = np_utils.to_categorical(Y_train, nb_classes)
#Y_test = np_utils.to_categorical(Y_test, nb_classes)
#print(np.shape(X_train))
#print(len(Y_train))
#print(np.shape(X_test))
#print(len(Y_test))
model = Graph()
model.input(shape=(img_channels, img_rows, img_cols), name='input1')
model.node(Convolution2D(32, 7, 7), name='conv11', input='input1', activation='relu')
model.node(Convolution2D(32, 3, 3), name='conv12', input='conv11', activation='relu')