NOWSMS简介

基于WSP/WTP的MMS传输(8)——测试工具 <br /><br />八 测试工具<br /><br />    在MMS 开发过程中,我的做法是先实现WSP/WTP 协议,对已经打包好的MMS PDU 做WSP/WTP 封装,然后发出去,最后再实现MMS 编/ 解码。这里要得到的MMS PDU ,可以使用NowSMS 这样一个软件,可以从http://www.nowsms.com上下载60天的试用版本,然后利用软件安装根目录下的mmscomp.exe 命令行工具生成以.mms 为扩展名的MMS PDU 。使用该工具,需要先制作彩信的资源文件,步骤如下 阅读详情

NOWSMS简介
====================

Now SMS/MMS Gateway(NowSMS)是一套SMS和MMS的内容交付解决方案。NowSMS是部署和开发SMS、MMS和WAP Push方案的快捷方法,可以用于Windows 2000/XP下的SMS网关、MMS网关、WAP Push网关以及多媒体消息中心。

NOWSMS的官方网站是:http://www.nowsms.com/ ,可以下载60天的试用版本来搭建自己的彩信中心;以下是NOWSMS的基本使用步骤:

1: 下载并安装NowSMS
2: 配置SMS/MMS Gateway以支持发送SMS和MMS
3: 发送SMS以确保正确配置了Gateway
4: 配置MMSC以支持发送MMS功能,并且配置可以使用MMSC的手机号列表.
5: 发送MMS以确保正确配置了MMSC
6: 配置手机上的MMSC以实现彩信上行功能
(如果遇到问题,可以把NOWSMS目录下的.log发给 nowsms@now.co.uk 寻求帮助)

NOWSMS的基本配置
====================

1. 配置GSM Modem
NowSMS requires a connection to an SMSC to interface with SMS and MMS networks. A SMSC connection can be a GSM Modem - A GSM modem or phone connected to a PC serial port (or to a USB port).
(可通过红外与笔记本连接,我的配置是Nokia 6610 + Dell Inspiron 600m )

2. 配置SMSC
The first step is to configure SMSC settings, which tell the gateway how it connects to the GSM network to send SMS.
(必须保证Modem支持发送SMS功能,市面上的GPRS上网卡因为使用cmwap,不支持SMS发送,即使NOWSMS能够找到,但也无法使用NOWSMS中发送SMS和MMS的功能 )

3. The Now SMS/MMS Gateway installs as a Windows service. The MMSC runs as a separate service process from the gateway.
(建议把service配置成手工启动的,因为如果系统启动后没有发现GSM Modem,系统将无法工作 )

4. Without the MMSC, you will still be able to "Send MMS Notifications" where the MMS content is stored on a separate web server, but you won't be able to use the "Send MMS Message" feature of the "web menu interface".

5. The MMSC supports sending MMS messages between mobile phones, and also
supports sending and receiving MMS messages between mobile phones and
standard internet e-mail systems.

6.MMSC的端口号
The gateway PC must be accessible via the internet in order to use its MMSC. When a mobile phone sends or receives an MMS message, it makes an HTTP connection to an MMSC (usually through a WAP gateway). The MMSC contains an integrated HTTP server to process these connections .
(Some operator WAP gateways have firewalls which prevent them from connecting to content servers that are installed on ports other than the default HTTP port of 80. Use caution when configuring the MMSC for a port other than 80, as this may prevent MMS messages from being received via some services. )

7. MMSC配置
Local Host Name or IP Address
specifies the local host name or IP address of the computer that is running the MMSC service. The name or address specified here will be used to construct URLs when sending MMS messages to mobile phones .
(必须确保MMSC的IP地址在本地也可以访问,因为NOWSMS在发送MMS时会验证URL的有效性;因为有些地方的外部IP是通过Firewall映射的,本地可能无法访问,建议直接绑定外部IP为第二个IP来解决这个问题 )
Domain Name for MMS EMail / SMTP Relay Host
It is possible to operate the MMSC without the e-mail link, leaving the "Domain Name for MMS E-Mail" and "SMTP Relay Host" fields blank.

8.手机号的格式
To define a MMSC user , you must define a phone number using international format
(比如中国手机,格式是+8613xxxxxxxxx/ 新加坡+65xxxxxxxx)

9.手机上的彩信中心
Note that for a mobile phone user to use the simple MMSC integrated with this
gateway, the mobile phone user must configure their MMSC to point to the address of the MMSC, and include their user name and password in the MMSC URL. Example:
http://x.x.x.x/username=password
The username can be either the user alias name or phone number.
(在使用中发现必须是国际格式的手机号,不能用别名,否则服务器报错 )

10. 用NOWSMS的WAP Gateway
Specify an IP address for the WAP gateway of 213.48.20.10
(this is a gateway at the Now Wireless offices)
.

11. GSM Modem
1) An external modem device, such as the Siemens MC35 or Wavecom FASTRACK.
2) A PC Card installed in a laptop, such as the Sierra Wireless Aircard 750
3) A standard GSM mobile phone with the appropriate cable and software driver to connect to a serial port or USB port on your computer.
(Any phone that supports the "extended AT command set" for sending/receiving SMS messages can be supported by the Now SMS/MMS Gateway )
A dedicated GSM modem (external or PC Card) is usually preferable to a GSM
mobile phone. This is because of some compatibility issues that can exist with
mobile phones.

12. SMS User / MMSC User
The “SMS Users” defines user accounts that are allowed to submit SMS and MMS messages through the gateway. (Note: Mobile phone users that connect to the MMSC to send and receive MMS messages are configured under the “MMSC Users”)

13. Long SMS
If the text message is longer than 160 characters, the gateway will automatically use concatenated SMS (“long SMS”) message support to send the entire message.

13. Send MMS Notification
The MMS Notification is sent to the recipient independent of the MMSC built-in to the
gateway. The message recipient will fetch the message directly from the URL specified. As the message is not routed through the MMSC, the MMSC cannot provide dynamic content adaptation and conversion services.

14. Send WAP OTA Bookmark
“Send WAP OTA Bookmark” allows bookmarks to be sent to compatible mobile phones. Simply specify the WAP URL, a title for the bookmark, and a phone number to
which the bookmark should be sent.

15. Send SMS URL
To send a text message via SMS, use the following URL format:
http://127.0.0.1:8800/?PhoneNumber=xxx&Text=xxx
1) Use either the local phone number format, or the international phone number format . 
2) If the international phone number format is used, note that you must substitute
“%2B” for the “+” character, because of URL escaping restrictions.

16. WAP Push
WAP Push messages are specially formatted SMS messages that display an alert
message to the user, and give the user the option of connecting directly to a particular URL via the mobile phone’s WAP browser.
Note that there are two types of “WAP Push” messages, “Service Indication (SI)” and “Service Load (SL)”. The “SL” format can be selected by including "WAPSL=1" as a URL parameter, and does not support a “Text” parameter, while the “SI” format does. (By specification, the “SL” format was designed to tell the browser to connect to a URL without user intervention. However, for security reasons, mobile phones will always display a prompt before connecting to a URL. Therefore, the lack of a text parameter makes the “SL” format considerably less user-friendly than the “SI” format, and in practice, most users will exclusively use the “SI” format.)

17. 2-Way SMS
The “2-Way” configuration contains settings relevant to the creation of 2-way applications that can receive SMS messages, and return a response based upon the content of the received SMS message. When an SMS message is received, the gateway will evaluate the content of the message, and can either execute a program, or connect to an HTTP URL, based upon the content of the message.

NOWSMS连接到Operator MMSC
========================================

By default, the Now SMS/MMS Gateway will act as an MMSC and perform direct
delivery of MMS messages to recipients using a combination of SMS and WAP
technologies.

1. 通过运营商的MMSC接收/发送MMS
NowSMS can use a GSM/GPRS modem to send and receive MMS messages via an operator MMSC. The NowSMS sends and receives MMS messages using the same protocol that is used by the MMS client in a mobile phone, so it simply requires that the SIM card in your mobile phone be provisioned by your mobile operator for MMS support.
1) 发送MMS
When sending an MMS message, the NowSMS initiates a GPRS connection to the mobile operator, it then makes a connection to the operator WAP gateway, and submits the MMS message over this WAP and GPRS connection to the mobile operator’s MMSC.
2) 接收MMS
When receiving an MMS message, the gateway first receives an MMS notification
message via SMS. When this special notification message is received, the
gateway initiates a GPRS connection to the mobile operator, and a connection
to the operator WAP gateway over GPRS, in order to retrieve the content of the
MMS message from the mobile operator’s MMSC.
Note: When a GSM phone or GSM modem receives an MMS message, what it actually
receives is an MMS notification message. The MMS notification message arrives via an SMS message (usually two concatenated SMS messages). The MMS notification message contains header information about the MMS message, plus a URL pointer (e.g., http://host/path/file.mms ) to the actual MMS content.
Note that you can still not use an MMS compatible phone as a GSM modem if you want to be able to receive MMS messages through the gateway. This is because an MMS compatible phone intercepts the MMS notification and tries to process it automatically, never forwarding it to the gateway. You must use a GSM/GPRS modem device to take advantage of this feature.

2. 小心运营商的限制
The reason that it would not work in many installations is that the operator MMSCs were either firewalled off so that they were inaccessible from the internet, or they were on private IP addresses within the operator network.

3. 配置信息
You will need to determine the GPRS APN (Access Point Name), the IP address of the WAP gateway, and the MMSC Message Server URL that are used for sending/receiving MMS via your operator network.
1) “WAP Gateway IP Address” should contain the IP address of the operator WAP gateway which will act as a proxy for connections to the MMSC.

4. MMSC路由
MMSC Routings can use MM1 – A binary format for transmitting MMS messages using HTTP POST. This is the protocol that is used for phone to phone MMS, so if you are routing messages to an operator MMSC over a GPRS connection.

The “Route messages to this account for recipient phone number(s)” field is an address mask for defining which recipient phone numbers should be routed to this account. For example, “+44*” would route all messages for the UK country code (44) to this connection. When multiple address masks are defined, they should be separated by a comma only (,) and no white space characters.

Note that when you are using MM1 to connect with an operator MMSC over GRPS, this “Server address” is the “MMS Server URL” that would normally be configured on a mobile phone to connect with the operator MMSC.

NOWSMS中的彩信功能
========================================

When you send an MMS message with NowSMS, this can be done using either of the following configurations:

1. Direct MMS delivery.
In this configuring, NowSMS is an MMSC. The MMS message content is stored on the NowSMS, and the gateway publishes a dynamic URL for access to the MMS message content. The gateway generates an MMS notification message to the recipient device which is sent over SMS, and this notification includes a URL pointer back to the MMS message content on the NowSMS server.

2.Send the message through the operator MMSC .
NowSMS supports all of the major MMS related protocols, including MM7, MM4, MM1 and EAIF for this purpose. But most frequently, what we see is the use of MM1 where NowSMS makes a GPRS connection over a GSM/GPRS modem, connects to the operator WAP gateway that is designated for MMS usage by the operator, and submits the message to the operator MMSC via the WAP gateway over the GPRS connection.
(The operator MMS gateway then generates the dynamic URL and MMS notification message that is ultimately received by the recipient device.)

The MMS message file format consists of an MMS message binary header, followed by a multipart MIME message where the multipart message is encoded in a binary multipart format as defined by the WAP Wireless Session Protocol (WSP) specification. This binary MMS message file is stored on a web server using a MIME type of application/vnd.wap.mmsmessage and an MMS message type of m-retrieve-conf. A subset of the binary MMS header is sent as an MMS notification message (MMS message type mnotification-ind) via SMS to the mobile device together with a URL pointer to the location of the complete message.

Once an MMS message file has been built and published via a web server, the
MMS notification message can be sent by the gateway using the following URL
format:

http://127.0.0.1:8800/?PhoneNumber=xxx&MMSURL=host/path/filename.mms

Before sending the MMS notification message, the gateway will validate that the MMS message file is of the MIME type application/vnd.wap.mms-message, and is of the MMS message type mretrieve-conf.

The MMSCOMP utility is provided to assist in the creation of MMS message files.

NOWSMS的使用技巧
========================================

1. 查看NOWSMS日志信息
在“管理工具”->“事件查看器”->“应用程序”中的日志信息,可以查看NOWSMS在启动和使用中的出错信息!如果发现“连接SMS Modem”出错,需要在SMSC中执行“Remove Service”,并重新添加"GSM Modem";
(The gateway always logs when its services are started and stopped. Additionally errors are reported to the event log if a particular SMSC interface fails to initialize, and when a user account exceeds their defined message quota for sending messages.)

2. 设置为Debug模式
修改配置文件SMSGW.INI/MMSGW.INI,在[SMSGW]中加入Debug=Yes ,这样调试信息就会写入到MMSC-yyyymmdd.LOG中,SMSDEBUG.LOG和SMSOUT-yyyymmdd.LOG中;

3. 查询MMS发送情况
如果在发送MMS时收到错误信息,先检查手机上MMSC的配置;然后可以查看Gateway目录下的MMSC-yyyymmdd.log;上行的MMS被存放在/MMSCDATA下的日期目录中

常用术语
========================================

SMPP (Short Message Peer to Peer) 短消息点对点协议,网关与短消息中心之间使用SMPP
CMPP (China Mobile Peer to Peer) 中国移动点对点协议,网关与SP之间使用CMPP协议
OMA (Open Mobile Alliance) 开放移动联盟,OMA为移动行业提供公开标准,帮助创建符合用户需求,并能跨国家、运营商和移动终端运行的互操作性服务。
3GPP (3G Partnership Project) 3G伙伴计划

nowSms 短信、彩信(可用其中mmscomp.exe生成彩信文件) Now SMS/MMS Gateway(NowSMS)是一套SMS和MMS的内容交付解决方案。NowSMS是部署和开发SMS、MMS和WAP Push方案的快捷方法,可以用于Windows 2000/XP下的SMS网关、MMS网关、WAP Push网关以及多媒体消息中心。 立即下载

相关推荐

NowSMS环境搭建

NowSMS工具用于手机发送信息的测试,本文图文并茂介绍如何搭建NowSMS测试环境,方便新手快速搭建手机测试环境。

使用NOWSMS搭建自己的彩信中心- -

使用NOWSMS搭建自己的彩信中心- -Tag: NOWSMS MMS 彩信中心 NOWSMS简介====================Now SMS/MMS Gateway(NowSMS)是一套SMS和MMS的内容交付解决方案。NowSMS是部署和开发SMS、MMS和WAP Push方案的快捷方法,...

ealpha 829

中国移动MMSC彩信中心模拟器

华为出品的中国移动的彩信中心(MMSC)的模拟器,支持彩信上下行、状态报告和读后报告。使用标准MM7协议通信。

用Now SMS/MMS 发送中国移动彩信

Now SMS/MMS是一个强大的短信/彩信发送服务器,它内置了彩信中心,在某些运营商的网络内可以通过普通的短信猫发送彩信,而不需要使用支持GPRS的短信猫,也就是说系统本身就具有了运营商的彩信中心的功能。然而,在中国移动的网络内是不能实现这种方式发送彩信的,必须通过移动梦网的彩信中心转发。彩信的发送其实是两个过程:1、向目标手机发送一条普通的提醒短信,其中包含了发送者号码

googoo3的专栏 2498

电信彩信中心技术规范

ZXME MMSC 电信彩信中心技术规范合集

开源光标主题实战:从Moshi Monsters到自定义指针的完整指南

光标主题是操作系统个性化的重要组成部分,它通过替换系统默认指针图标来改变视觉交互体验。其原理在于操作系统允许用户自定义指针资源文件,这些文件定义了不同状态下的光标图像。从技术价值看,一套设计良好的光标主题不仅能提升桌面美观度,还能增强用户的情感连接和操作愉悦感,是低成本高回报的数字幸福感提升方案。在应用场景上,无论是开发者、设计师还是普通用户,都可以通过更换光标主题来个性化工作环境。本文以热门的Moshi Monsters开源光标项目为例,深入解析了光标主题的设计逻辑、系统适配方案以及二次创作方法,涵盖了W

weixin_30879833的博客 569

使用NOWSMS搭建自己的彩信中心

NOWSMS简介====================Now SMS/MMS Gateway(NowSMS)是一套SMS和MMS的内容交付解决方案。NowSMS是部署和开发SMS、MMS和WAP Push方案的快捷方法,可以用于Windows 2000/XP下的SMS网关、MMS网关、WAP Push网关以及多媒体消息中心。NOWSMS的官方网站是:http://www.nowsms

googoo3的专栏 3849

C++常见面试题总结

C++常见面试题总结

xu_fu_yong的专栏 8万+

使用NowSMS Gateway来接收发送短信和彩信

硬件准备:GPRS Modem,不同的运营商波段可能不一样,比如Cingular是850/1900 MHz,而China Mobile是900/1800 MHz,购买时要注意.把SIM card插入Modem, SIM要开通GPRS service,把Modem接到COM Port,完成硬件准备。软件准备:下载SMS Gateway,我用的是NowSMS Gateway,觉得还可以,支持多种语言字

phiger的专栏 1万+

NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver. 最全解决方案!详细!

真的折磨了我整整一天,从网上的资料到GPT都翻遍了,终于是解决了!以下方案希望能帮助到你们。

weixin_44124632的博客 1万+

Palantir解密:“本体”的建模逻辑及其扩展方向

上一篇重点从对现实世界建模的角度探讨了“本体”在数字化架构中的核心意义。这里借Palantir的“本体”概念、解析Palantir只是起点,目标旨在以他山之石攻玉——探索数字世界的底层架构逻辑,最终为构建自主体系提供思考。Palantir以“本体论”为核心的建模方案是否代表终极答案,不宜过早下结论,但其思路值得深入剖析。

SZSDQJC的博客 2635

如果生成彩信mms文件

下面教大家如何快速制作彩信mms文件,首先安装NowMMS软件,这个是国外的一个mms、mms模拟平台,其中有一个软件为mmscomp.exe,使用该软件,就可以快速生成彩信文件了,主要分为下面几步: 第一步:制作hdr描述文件,其格式如下: Message-type: m-retrieve-conf Transaction-id: 45adb06d MMS-version...

manok的专栏 1482

俄罗斯方块 C++控制台版

一、创建方块 wstring tetromino[7]; tetromino[0].append(L"..X...X...X...X."); // Tetronimos 4x4 tetromino[1].append(L"..X..XX...X....."); tetromino[2].append(L".....XX..XX....."); tetromino[3].append(L"..X..XX..X......"); tetromino...

一只大鸽子的博客 1625

download

http://www16.fixdown.com/en/fc41cc23a8ff886b.asp - nowSMS 

smartoy的专栏 427

用FPGA驱动WS2812B点阵,手把手教你实现动态文字显示(附完整Verilog代码)

本文详细介绍了如何使用FPGA驱动WS2812B点阵实现动态文字显示,包括硬件连接、Verilog代码实现和动态效果设计。通过精确的时序控制和数据处理,读者可以掌握FPGA与WS2812B的交互技术,并实现炫酷的显示效果。附完整Verilog代码,适合硬件爱好者和工程师参考实践。

weixin_30482383的博客 669

MIKE水动力笔记4_制作网格

建立水动力模型前的重要一步就是制作网格,本文所讲内容就是如何在MIKE中制作网格。

晏长街的博客 2万+

Linux 通过NowSMS + 彩信猫 发送彩信实践

通过彩信猫发彩信的实质是实现相应的协议,然后将数据已数据流的形式chua

u013275741的专栏 1563

【RT-DETR涨点改进】独家注意力改进篇 | 手把手教你在RT-DETR上使用LSKAttention大核注意力机制(助力目标检测极限涨点)含多种创新改进点

本文提出了一种LSKA大核注意力机制优化RT-DETR模型的方法。LSKA通过将2D深度卷积核分解为级联的1D水平和垂直核,显著降低了计算复杂度和内存占用,尤其在处理大卷积核时优势明显。该模块在图像分类、目标检测等视觉任务中保持与LKA相当的性能,同时展现出更强的鲁棒性。文章详细介绍了LSKA的网络结构、核心代码实现方法,并提供了多种RT-DETR改进方案,包括rtdetr-r18-LSKA、rtdetr-l-LSKA等7种yaml配置文件,通过实验验证了该方法的有效性。

Ai缝合怪、助力小伙伴高效发论文 252

Shift Tables – National Language SMS in 160 characters without Unicode

Topic Keywords: 160 characters, long SMS, SMS shift table, Unicode The fact that messages that contain characters outside of theGSM character set require Unicode encoding and are limited to 70 chara...

FIGHTING!!! 845

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

SMS Shift Table

http://www.nowsms.com/discus/messages/1/70000.html We have implemented shift table support (locking shift table and single shift table) to NowSMS for the following languages: Turkish, Spanish, Portug

stephegn的专栏 1932

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

WAP调试环境

最近在写WAP浏览器,快完工了。在这里讲下在PC上如何建立开发环境。 1. 去http://www.nowsms.com/ 下载nowsms, 有详细的如何建立彩信中心的说明,建立彩信中心 2. 去http://www.nowwap.com 下载wap gateway(wap proxy), 作为网关。这个免费版不支持WTLS,    若需要WTLS的网关,可在linux上安装www.kannel.org上的网关,或在windows上安装 http://handheld.softpedia.

2079

深度学习工具包 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")

MMS Notification 简介

从OMA MMS封装协议中对MMS Notification的定义可以知道,MMS Notification实际上是通过WAP PUSH来实现的。WAP PUSH是可以通过两种方法来实现的,一种是通过GPRS的方式,另一种就是通过SMS的方式。但前一种方式由于开发时间长,调测复杂

漂流瓶の海岸 2582

php手机号码一分钟发送一次短信_如何查看每天只发送一条短信的电话号码?

我使用nowsms网关发送短信给自己,我想要的是我的php编码必须设置每分钟的crontab会刷新我的页面,所以一旦cronjob运行,它会自动发送短信给我,所以每一分钟我也会得到一个短信,但我怎么才发送一次我的手机与cronjob总是运行的每一分钟?今天如何查询我的号码已经发出一次,所以下一分钟不需要再发送同样的短信给我,只是等到第二天才会收到另一个短信。这里是我发送短信编码,SendSMS("...

weixin_35676745的博客 161
上一篇: C++ 类访问控制(public/protected/private)
下一篇: C++默认参数与函数重载
BlueSy2008
博客等级 码龄20年 26粉丝 26原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值