本文整理汇总了Python中dataset.DataSet.datum_count方法的典型用法代码示例。如果您正苦于以下问题:Python DataSet.datum_count方法的具体用法?Python DataSet.datum_count怎么用?Python DataSet.datum_count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dataset.DataSet
的用法示例。
在下文中一共展示了DataSet.datum_count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open
# 需要导入模块: from dataset import DataSet [as 别名]
# 或者: from dataset.DataSet import datum_count [as 别名]
# Parameters
with open(params_path, "r") as f:
for line in f:
param, value = line.strip().split()
if param == "width": width = int(value)
if param == "height": height = int(value)
if param == "shift": shift = int(value)
if param == "channels": n_channels = int(value)
if param == "train_len": n_train = int(value)
if param == "test_len": n_test = int(value)
if param == "min_value": min_value = float(value)
if param == "max_value": max_value = float(value)
train = DataSet(fdata_path, "train", new=False)
train.datum_count = n_train
test = DataSet(fdata_path, "test", new=False)
test.datum_count = n_test
DataSet.total_datum_count = n_train + n_test
DataSet.min_value = min_value
DataSet.max_value = max_value
print "Datum shape : ", n_channels, "x", width, "x", height
print "Shift : ", shift
print "Train, test : ", n_train, n_test
print "Path : ", fdata_path
print "Min ; Max :", DataSet.min_value, DataSet.max_value
print "Generate random vector p to shuffle data"
train_p = np.array(list(range(len(train))))