以前的一次oracle数据库大数据量数据的生成方法(自身经历原创)

掌握数据库连接技术:SQL、Oracle、MySQL深入解析 数据库连接指的是应用程序与数据库服务器之间建立的一种通信机制,使得数据能够在一个系统到另一个系统之间传输。有效的数据库连接不仅保证了数据的安全性和一致性,而且对于提高应用程序的性能和可靠性也起到了关键作用。结构化查询语言(SQL)是数据库的核心。自20世纪70年代IBM开发的SEQUEL开始,SQL经历了不断的标准化过程。1986年,SQL成为美国国家标准协会(ANSI)标准,随后成为国际标准化组织(ISO)标准。 阅读详情

一次和几个同事要做一个test,需要数据量在6000万条数据左右,先用存储过程生成数据结果在开始时候还可以,后来几乎1分钟几分钟一条记录,而且最重要的是存储过程中忘记写commit;结果数据达到1G后回滚段溢出,数据库崩溃,重新启动后还是老样子到后来很慢。

后来采用insert select的方法,确实很快。

相关方法如下:

1。

spool task1.log

create table cas_smartcard
(
  ic_no        char(10) ,
  ic_status    number(1),
  stock_date   date,
  used_date    date,
  group_id     number(6),
  USER_INDEX     number(3),
  area_id      number(5),
  ic_id        varchar2(12),
  primary key(ic_no)
)storage (initial 120M next 12M pctincrease 0);

--create by runnerunning@163.com

alter table cas_smartcard disable primary key;

truncate table cas_smartcard;

Exec Init_data_IC('20040601',1,0,300031);
Exec Init_data_IC('20040701',2,1172,300031);
Exec Init_data_IC('20040801',3,2344,300031);
Exec Init_data_IC('20040901',4,3516,300031);
Exec Init_data_IC('20041001',5,4688,300031);
Exec Init_data_IC('20041101',6,5860,300031);
Exec Init_data_IC('20041201',7,7032,300031);
Exec Init_data_IC('20050101',10,8204,300031);
Exec Init_data_IC('20050201',100,9376,300031);
Exec Init_data_IC('20040821',1,10548,299711);

--create by runnerunning@163.com

create index idx_smartcard_ic_no on cas_smartcard(ic_no)
tablespace indx
storage (initial 40M next 4M pctincrease 0 );

spool off;

2。

spool task2.log

drop table cas_update_auth;

--create by runnerunning@163.com

create table cas_update_auth parallel as
select  ic_no ic_no,0 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,1 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,2 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,3 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,4 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,5 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,6 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,7 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,8 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,9 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,10 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,11 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,12 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,13 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,14 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,15 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,16 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,17 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,18 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard
union all
select  ic_no ic_no,19 object_id,stock_date auth_start,stock_date+60 auth_end,
  1  auth_oper,sysdate oper_date,1 object_type,1 pre_auth
From cas_smartcard;

create index idx_update_auth on cas_update_auth(ic_no,object_id)
tablespace indx
storage (initial 400M next 40M pctincrease 0 );

drop table cas_auth;

--create by runnerunning@163.com

create table cas_auth parallel as
select ic_no, object_id ,
   auth_start , auth_end ,
   oper_date , object_type,
   pre_auth
from cas_update_auth;

create index idx_auth on cas_auth(ic_no,object_id)
tablespace indx
storage (initial 400M next 40M pctincrease 0 );

spool off;

生成数据并导入CA数据
任务:1.生成CAS_SMARTCARD表(共300万记录)
      2.生成CAS_AUTH与CAS_UPDATE_AUTH表(各6000万记录)

--create by runnerunning@163.com

解决办法:
   一.使用过程生成CAS_SMARTCARD表记录,再使用过程生成CAS_AUTH与CAS_UPDATE_AUTH表记录
   前提条件:无
   速度:慢,经测试4分钟生成20万条记录,生成一个大表需20小时
   --create by runnerunning@163.com
   二.使用过程生成CAS_SMARTCARD表,再通过创建CAS_AUTH与CAS_UPDATE_AUTH表(同时生成记录)
   前提条件:两个大表与CAS_SMARTCARD表有关联
   速度:快,经测试4分钟生成5100万条记录,生成一个大表需15分钟
   不足:容易产生空间碎片

具体执行:
   1.创建CAS_SMARTCARD空表,并运行过程生成CAS_SMARTCARD表记录。见脚本task1.sql;
   2.创建CAS_UPDATE_AUTH表同时生成记录.并创建索引。见脚本task2.sql;
   3.创建CAS_AUTH表同时生成记录.并创建索引。见上脚本task2.sql;

注意事项:
   1.创建大表的索引,需要大TEMP
   2.生成大批量数据时,要注意提交记录。同时可以设置为不进行日志记录。
   3.注意计算数据存储空间。如CAS_SMARTCARD表需156M,CAS_UPDATE_AUTH表需3.2G.
      生成CAS_UPDATE_AUTH表的索引,占用索引空间需1.52G,临时空间需1.6G

 

--create by runnerunning@163.com

 

 

 

 

 

Linux系统上Oracle数据库安装与配置 本文还有配套的精品资源,点击获取 简介:安装Oracle数据库是一项复杂但关键的任务,尤其是在企业级应用中。本简介详细说明了在Linux上安装和配置Oracle数据库的全过程,包括系统要求、用户权限设置、必需的程序包安装、版本选择、实例与监听配置、安全设置、性能调优、备份与恢复策略、以及数据库的维护和更新。安装过程将帮助用户设置高性能、高可用性的企业级Oracle数据库系统... 阅读详情

相关推荐

Oracle 11g数据库管理技术参考文档完整指南

Oracle 11g作为Oracle数据库的重要版本之一,在IT行业中扮演着举足轻重的角色。对于数据库技术的开发者和使用者而言,了解Oracle 11g不仅是一项基础技能,更是深入挖掘数据价值的必经之路。

weixin_33072399的博客 854

在Oracle中十分钟内创建一张千万级别的表

如何在短时间内,在Oracle中创建一张千万级别的大表呢?作者提出了自己的做法。

一念非凡 965

Oracle大数据批量导出工具

在Oracle数据库上导出上千万上亿数据的工具 cmd 到本目录 然后执行如下命令: ->sqluldr2.exe user=用户名/密码@数据库 query="查询语句" table=表名 head=yes FILE=存放路径 例如:sqluldr2.exe user=u/pass@db query="select * from u.tablename" table=tablename head=yes FILE=d:\inf.csv

Oracle快速创建百万数据

create table myTestTable as select rownum as id, to_char(sysdate + rownum/24/3600, 'yyyy-mm-dd hh24:mi:ss') as inc_datetime, trunc(dbms_random.value(0, 100)) as random_i...

fengbird的博客 2071

Oracle大数据量数据生成器

Oracle大数据量数据生成器Data_Generator的使用(含近似随机date数据生成

Oracle大数据量数据导入导出示例

很不错的Oracle大数据量数据导入导出示例

Oracle 大数据量导入导出

1. 通过dmp 导入导出,这种情况一般需要注意用户的命名空间 2. 通过sqlldr实现 a.新建导入控制文件 input.ctl Load data Characterset UTF8 Infile 'H:\POI\baidu.txt' Append into table tbl_poi_baidu fields terminated by "," Optionally enclosed by '""' Trailing nullcols (POI_NAME,CLASS_ALL,ADDR,PHO

kunfd的博客 5348

plsql大数据量导出工具

oracle百(千)万级表数据导出工具,用于Oracle数据库导出大数据量表 ,保存格式如csv

文件上传时快速生成1G、10G大小的空文件

dd if=/dev/zero of= bs=<一次复制的大小> count=<复制的次数>fsutil file createnew <文件大小单位字节>of:fileName为文件名称,例如test.txt;本文是由于公司测试人员测试文件上传时,bs:设置一次复制的大小,例如1M;count:设置复制次数,例如50;* 创建固定大小的文件第一种方法。* 创建固定大小的文件第二种方法。问我该如何创建指定大小的大文件。比如1G、10G等大小的文件。2.windows系统。2.windows系统。

liangghoney的博客 1866

【深度学习基础】Temporal Fusion Transformer

从下向上看:全连接(Dense) → ELU(指数线性激活函数(比relu好点,有利于模型收敛)) → 全连接(Dense) → 门控线性单元(Gate)(Gated Linear Units (GLUs)) → Layernorm。:一方面,它可以进行静态上下文变量和动态变量的融合,另一方面,通过门控进行了特征选择操作,门控体现在GLU(门控线性单元)中,用了sigmoid控制信息的通过程度,具有良好的适应性,能够自动选择有效信息,自适应地调整网络复杂性。输入:主输入,可选的上下文向量c。

weixin_41838721的博客 1232

sylar学习系列一

开发环境 Centos7最小系统 gcc 9.1 cmake 环境可能存在的一些问题 可能存在的问题,linux最小系统没有一些常用命令,如果我们处于外网我们可以yum安装,但却遇到以下问题 can not find a valid baseurl for repo: base/7/x86-64 可修改网络配置 vi /etc/sysconfig/network-scripts/ifcfg-ens123 # 不是每个主机都是ens123 把ONBOOT=no,改为ONBOOT=yes 重启网络

wuguinianjing的博客 1020

db2 迁移 oracle的一次经历

最近朋友给了个活,将系统的db2转成Oracle,不大也不小,但之前没做过。。 具体情况是,表有900多张,存储过程70多,视图130多,函数和其他若干。。。。。。。。至于需要一直的数据量,我只知道要全量,具体多大。。。。百万条应该有吧。 那咱直接就向度娘伸手了。。。。。。度娘是伟大的。。。用她那甘甜的...一直哺育着我们。。 网上各种db2转oracle的做法看的眼花缭乱。。

Java_gjyw的专栏 4655

从零到千兆:KSZ9031 PHY芯片在Zynq PS端的驱动移植心路历程

本文详细记录了在Xilinx Zynq-7000平台(基于XC7Z020芯片)上,为KSZ9031千兆以太网PHY芯片移植LwIP协议栈驱动的完整过程。从硬件连接配置、Vivado工程设置到LwIP库的深度修改与调试,分享了解决PHY识别、自协商及性能优化等关键问题的实战经验,助力开发者实现稳定的千兆网络连接。

honey的博客 1117

oracle大数据量更新引发的死锁问题解决方法及oracle分区和存储过程的思考

前言 前几天上午在对数据库的一张表进行操作的时候,由于这张表是按照时间的一张统计表,正好到那天没有测试数据了,于是我想将表中所有的时间,统一更新到后一个月,于是对80w条数据的更新开始了。整个过程曲折的一批。同时学到了很多知识,在此进行记录。希望对大家有帮助。 首先是大批量更新,由于数据已经进行了分区,开始对分区进行分析,然后大批量操作死锁,对死锁的解决,最后存储过程来解决数据的大批量插入。 曲折的过程开始 由于测试数据到21号就没了,21号一上去,发现开发的功能,都没有数据了,图表也都空了。查询原

经典鸡翅 2070

【WorkBuddy】WorkBuddy 智能体快速上手:从零到一的实践指南

文章摘要: 传统自动化脚本难以应对灵活多变的自然语言需求,导致逻辑复杂、维护成本高。智能体(Agent)通过理解语义意图、动态决策和松耦合组件解决了这些问题。WorkBuddy采用声明式配置,通过可视化界面定义意图、实体和对话策略,无需编码即可快速构建智能体。其核心组件包括意图分类、实体提取、对话策略、故事样本和回退机制,适用于客服支持、知识问答等高频场景。通过环境准备(Python/Node.js/Redis)和简单配置,用户可以快速搭建可运行的智能体,显著提升自动化效率。

ruiqideng的博客 1720

人工智能(AI)简史:推动新时代的科技力量

人工智能(AI,Artificial Intelligence)是计算机科学的一个分支,旨在研究和开发可以模拟、扩展或增强人类智能的系统。它涉及多种技术和方法,包括机器学习、深度学习、自然语言处理(NLP)、计算机视觉、专家系统等。

qq_17153885的博客 1万+

我的oracle备份经历

我的oracle备份经历 做了一个系统,用了好几年,数据量以每年100多G的速度增长,现在快有1T了,备份速度慢的问题逐渐暴露出来。基于系统的特点及数据量,系统采用备份所有数据的方式,不采用增量备份。 系统原来设计备份时并没有考虑到数据量大的问题,采用是exp/imp方式备份,1T数据备份需要2天左右才可以完成,时间太长。后来考虑到导出优化,对exp的buffer、direct等参数进行修改,但效...

lvcha791007的博客 1349

从零开始:使用VMOS Pro和Xposed绕过APP环境检测的完整指南

本文详细解析了使用VMOS Pro和Xposed框架绕过APP环境检测的完整技术方案,包括模拟器检测、Root环境检测和Hook框架检测的对抗方法。通过实战案例和代码示例,展示了如何利用Xposed Hook技术拦截检测逻辑,特别针对360加固等保护技术提供了解决方案。

ee345的博客 738

oracle 数据库创建表

好好好好久没更新了,最近真是堕落了,做的都是小菜鸟做的东西,都没得写,但是最近数据库突然从mysql换到oracle,哈哈哈哈哈,还真是挺复杂的 1、首先建表 fund 是表名称 其他的是字段名称 create table fund( id number(11) primary key,/*id 主键*/ name varchar2(100),/*...

weixin_30919919的博客 281

INCA软件操作指南:手把手教你生成和解析DCM标定数据文件

本文详细介绍了INCA软件在汽车ECU开发中生成和解析DCM标定数据文件的全流程。从A2L文件导入到DCM文件生成,再到HEX文件导出,手把手教你掌握标定数据处理的实用技巧,包括参数标定、曲线标定和常见问题排查,帮助工程师提升工作效率。

weixin_29271053的博客 1065

logisim实验六:MIPS运算器设计

实验目的 学生理解算术逻辑运算单元(ALU)的基本构成,掌握 Logisim 中各种运算组件的使用方法,熟悉多路选择器的使用,能利用前述实验完成的 32 位加法器、 Logisim 中的运算组件构造指定规格的 ALU 单元。 设计要求 利用前面实验封装好的 32 位加法器以及 logisim 平台中现有运算部件构建一个 32 位算术逻辑运算单元(禁用 Logisim 系统自带的加法器,减法器),可支持算术加、减、乘、除,逻辑与、或、非、异或运算、逻辑左移、逻辑右移、算术右移运算,支持常用程序状态标志(有符号

gyp0205的博客 2万+

大数据量高速处理,GBase 8a性能获认可

文 |陈花平 福建农信之前行内绝大部分系统使用的都是Oracle数据库,随着业务发展,数据量一直增长,我们数据条线参考农业银行的案例,将数据仓库逐步从Oracle过渡到GBase数据库,批量处理性能有了较大提升,在GBase官网中也可以查到此案例。去年疫情期间我负责的一个系统计划进行GBase 8a MPP Cluster数据库建设,将数据加工处理部分从Oracle迁移到GBase,出于项目建设需要,我报名了GBase 8a V86版本的培训课程并通过了认证考试。随着项目的推进,对GBase...

weixin_47390342的博客 538

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

oracle数据库为什么这么大

oracle 平行服务器通过使一组结点共享同一簇中的工作来扩展windownt的能力,提供高可用性和高伸缩性的簇的解决方案。db2把数据库管理扩充到了并行的、多节点的环境. 数据库分区是数据库的一部分,包含自己的数据、索引、配置文件、和事务日 志。db2在企业级的应用最为广泛,在全球的500家最大的企业中,几乎85%以上用db2数据库服务器,而国内到97年约占5%.sQL server 只能在windows 上运行,没有丝毫的开放性,操作系统的系统的稳定对数据库是十分重要的。

xiaoweids的博客 335

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

从 MySQL 到 Oracle 再到全面 TiDB ,云盛海宏的数据库架构实践

本文介绍了云海零售系统的数据库架构演进,探讨了数据库设计在零售业业务发展中的重要性。文章由 InfoQ 主编赵钰莹撰写,与云盛海宏首席架构师洪亮共同探讨了云海零售系统整体架构从 MySQL 到原生分布式变迁的思路和诸多思考。

TiDB_PingCAP 的博客 534

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

SAP DB02里写原生SQL取数,比SE16N导表再合并Excel快多了!

本文详细介绍了在SAP DB02中使用原生SQL进行高效数据查询的方法,相比传统的SE16N导出和Excel合并处理,原生SQL方案能显著提升处理速度和准确性。通过实际案例和性能优化技巧,帮助用户快速掌握跨表查询、结果导出及高级SQL应用,适用于销售订单、交货单等复杂业务场景。

weixin_30693683的博客 319
上一篇: Sybase powerbuilder pb8--pb10中使用jdbc来做数据源的发布方法
下一篇: weblogic程序移植到jboss上的一个问题解决方法,j2ee,原创
runnerrunning
博客等级 码龄25年 5粉丝 21原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值