HTTP1.1 Notes 4, Request & Response & Entity

[color=blue][b]Request[/b][/color]
Request = Request-Line
*(( general-header
| request-header
| entity-header ) CRLF)
CRLF
[ message-body ]
[b]Request-Line[/b]
Request-Line = Method SP Request-URI SP HTTP-Version CRLF

An example Request-Line would be:

GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1

The Method token indicates the method to be performed on the resource identified by the Request-URI
The method is case-sensitive

Method = "OPTIONS"
| "GET"
| "HEAD"
| "POST"
| "PUT"
| "DELETE"
| "TRACE"
| "CONNECT"
| extension-method
extension-method = token

The methods GET and HEAD MUST be supported by all general-purpose servers. All other methods are OPTIONAL
An origin server SHOULD return the status code 405 (Method Not Allowed) if the method is known by the origin server but not allowed for the requested resource, and 501 (Not Implemented) if the method is unrecognized or not implemented by the origin server

Request-URI = "*" | absoluteURI | abs_path | authority

The asterisk "*" means that the request does not apply to a particular resource, but to the server itself, and is only allowed when the method used does not necessarily apply to a resource

[b]The Resource Identified by a Request[/b]
The exact resource identified by an Internet request is determined by examining both the Request-URI and the Host header field
1. If Request-URI is an absoluteURI, the host is part of the Request-URI. Any Host header field value in the request MUST be ignored.

2. If the Request-URI is not an absoluteURI, and the request includes a Host header field, the host is determined by the Host header field value.

3. If the host as determined by rule 1 or 2 is not a valid host on the server, the response MUST be a 400 (Bad Request) error message.

[b]Request Header Fields[/b]
request-header = Accept
| Accept-Charset
| Accept-Encoding
| Accept-Language
| Authorization
| Expect
| From
| Host
| If-Match

| If-Modified-Since
| If-None-Match
| If-Range
| If-Unmodified-Since
| Max-Forwards
| Proxy-Authorization
| Range
| Referer
| TE
| User-Agent

| Range
| Referer
| TE
| User-Agent
New or experimental header fields MAY be given the semantics of request- header fields if all parties in the communication recognize them to be request-header fields
Unrecognized header fields are treated as entity-header fields

[color=blue][b]Response[/b][/color]
Response = Status-Line
*(( general-header
| response-header
| entity-header ) CRLF)
CRLF
[ message-body ]

[b]Status-Line[/b]
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF

The first digit of the Status-Code defines the class of response
There are 5 values for the first digit:
- 1xx: Informational - Request received, continuing process

- 2xx: Success - The action was successfully received,
understood, and accepted

- 3xx: Redirection - Further action must be taken in order to
complete the request

- 4xx: Client Error - The request contains bad syntax or cannot
be fulfilled

- 5xx: Server Error - The server failed to fulfill an apparently
valid request

Status-Code =
"100" ; Continue
| "101" ; Switching Protocols

| "200" ; OK
| "201" ; Created
| "202" ; Accepted
| "203" ; Non-Authoritative Information
| "204" ; No Content
| "205" ; Reset Content
| "206" ; Partial Content

| "300" ; Multiple Choices
| "301" ; Moved Permanently
| "302" ; Found
| "303" ; See Other
| "304" ; Not Modified
| "305" ; Use Proxy
| "307" ; Temporary Redirect

| "400" ; Bad Request
| "401" ; Unauthorized
| "402" ; Payment Required
| "403" ; Forbidden
| "404" ; Not Found
| "405" ; Method Not Allowed
| "406" ; Not Acceptable
| "407" ; Proxy Authentication Required
| "408" ; Request Time-out
| "409" ; Conflict
| "410" ; Gone
| "411" ; Length Required
| "412" ; Precondition Failed
| "413" ; Request Entity Too Large
| "414" ; Request-URI Too Large
| "415" ; Unsupported Media Type
| "416" ; Requested range not satisfiable
| "417" ; Expectation Failed

| "500" ; Internal Server Error
| "501" ; Not Implemented
| "502" ; Bad Gateway
| "503" ; Service Unavailable
| "504" ; Gateway Time-out
| "505" ; HTTP Version not supported
| extension-code

extension-code = 3DIGIT
Reason-Phrase = *<TEXT, excluding CR, LF>

pplications MUST understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent to the x00 status code of that class, with the exception that an unrecognized response MUST NOT be cached

[b]Response Header Fields[/b]
response-header = Accept-Ranges
| Age
| ETag
| Location
| Proxy-Authenticate
| Retry-After
| Server
| Vary
| WWW-Authenticate

[color=blue][b]Entity[/b][/color]
Request and Response messages MAY transfer an entity if not otherwise restricted by the request method or response status code
An entity consists of entity-header fields and an entity-body, although some responses will only include the entity-headers

[b]Entity Header Fields[/b]
Entity-header fields define metainformation about the entity-body or, if no body is present, about the resource identified by the request

entity-header = Allow
| Content-Encoding
| Content-Language
| Content-Length
| Content-Location
| Content-MD5
| Content-Range
| Content-Type
| Expires
| Last-Modified
| extension-header

extension-header = message-header

[b]Entity Body[/b]
The entity-body (if any) sent with an HTTP request or response is in a format and encoding defined by the entity-header fields

entity-body = *OCTET

An entity-body is only present in a message when a message-body is present
When an entity-body is included with a message, the data type of that body is determined via the header fields Content-Type and Content- Encoding
These define a two-layer, ordered encoding model:

entity-body := Content-Encoding( Content-Type( data ) )

Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body
If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource
If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream"

The entity-length of a message is the length of the message-body before any transfer-codings have been applied

[b]Examples[/b]
[code]
D:\projects\maui>curl -I www.g.cn
HTTP/1.1 301 Moved Permanently
Location: http://www.google.cn/webhp?source=g_cn
Content-Type: text/html; charset=UTF-8
Date: Fri, 26 Dec 2008 05:07:21 GMT
Expires: Sun, 25 Jan 2009 05:07:20 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 0

D:\projects\maui>curl -I www.google.cn
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Date: Fri, 26 Dec 2008 05:07:28 GMT
Expires: -1
Content-Type: text/html; charset=GB2312
Set-Cookie: PREF=ID=fc9dd9293e07dfbd:NW=1:TM=1230268048:LM=1230268048:S=GSJ0ovAC
pSDvYdtq; expires=Sun, 26-Dec-2010 05:07:28 GMT; path=/; domain=.google.cn
Server: gws
Content-Length: 0

D:\projects\maui>curl -I 192.168.0.5
HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Set-Cookie: _freewheel_session_id=6f190d42bf361e23336c7b646a565c2d; path=/; Http
Only
Location: http://192.168.0.5/system/account/login
Cache-Control: no-cache
Content-Length: 105
Date: Fri, 26 Dec 2008 05:27:16 GMT
Server: lighttpd/1.4.19
[/code]
Windows下本地部署Claude Code:CC Switch网关实战指南 AI编程助手正成为现代开发者的标配工具,其核心是将大语言模型能力安全、可控地集成到本地IDE中。原理上,这类工具通常采用‘客户端插件+本地代理服务’的分层架构,以实现API密钥隔离、协议适配与调试可观测性。技术价值在于兼顾合规性、安全性与工程可维护性,避免黑盒客户端带来的权限失控与故障不可溯问题。典型应用场景包括VS Code中的智能代码补全、注释转代码、遗留项目理解等。本文聚焦Claude Code在Windows环境的本地化落地,详解CC Switch作为轻量级本地网关的设计逻辑与实操部署,覆盖从Nod 阅读详情

相关推荐

纳米香蕉:AI能力增量演进的工程化识别与落地

大模型能力提升正从‘颠覆式跃迁’转向‘可测量、可归因、可复用’的增量演进——这一范式被形象称为‘纳米香蕉’。其本质是单点指标(如延迟降低0.3秒、实体召回率提升0.7%)在真实生产环境中的稳定兑现,而非参数或架构的宏观升级。理解该现象需把握三个技术基点:一是能力变化落在毫秒级响应、千分点准确率等工程敏感量级;二是依赖API头字段(如X-Google-AI-Capability-Score)、Schema差异与压力拐点等可观测信号;三是必须绑定业务KPI(如客服首次解决率、政策时效误差)完成价值闭环。Goog

weixin_34296641的博客 461

Gemini 3.1 Flash-Lite:工业级AI流水线的低成本高稳推理引擎

大语言模型推理引擎正从‘通用对话工具’向‘可编程AI基础设施’演进。其核心原理在于通过精简推理路径、固化输出确定性、优化上下文处理机制,在保障结构化任务准确率的前提下,实现毫秒级响应与超低API成本。技术价值体现在高并发容错、长上下文稳定解析及原生多模态文件直入能力,广泛应用于客服工单分类、语音转写、PDF结构化抽取、智能路由中枢和文档初筛等工业流水线场景。Gemini 3.1 Flash-Lite正是这一范式转型的典型代表,以1048576 token上下文与thinking_config可控机制,重新定

weixin_34117211的博客 341

MuleSoft+LLM企业级AI编排实战:构建可审计、合规、上下文感知的智能工作流

大语言模型(LLM)在企业落地面临安全断层、数据滞后与业务逻辑脱节三大瓶颈,单纯调用OpenAI API无法满足GDPR合规、实时系统集成和端到端审计要求。MuleSoft作为企业级集成中枢,凭借预置连接器、属性级数据脱敏、全链路Trace ID追踪及动态Policy策略,为LLM提供可信执行环境。其核心价值在于将非结构化业务语义翻译为LLM可理解的上下文指令,并支撑从LLM代理网关、上下文增强工作流到自主决策闭环的三级演进。本文聚焦DataWeave语义编织、System Prompt工程化约束、结构化响

weixin_34341229的博客 354

HTTP Error - Status Code Definitions

10 Status Code Definitions<br /> Each Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response. 10.1 Informational 1xx<br /> This class of status code ind

sanfengshou的专栏 1678

Wireshark实战指南:从抓包到网络故障排查的完整流程

网络协议分析是理解互联网通信、进行故障排查和安全审计的基础技术。其核心原理是通过捕获和解析网络数据包,将底层的二进制数据流转化为可读的协议信息,从而透视网络交互的完整过程。这项技术的价值在于,它能让工程师超越应用日志和监控图表,直接观察传输层的真实行为,精准定位问题根源。无论是分析TCP连接的建立与重传,还是解密TLS会话以调试HTTPS应用,协议分析工具都是不可或缺的。在实际应用中,它被广泛用于网络性能优化、安全事件取证、应用协议调试以及网络行为学习等多个场景。本文以Wireshark这一主流工具为例,结

ctpaknc9526的博客 337

MuleSoft企业级AI编排:LLM集成的治理、校验与流程韧性

AI编排(AI Orchestration)是企业将大语言模型(LLM)深度融入现有IT体系的核心范式,其本质并非简单调用API,而是通过服务化治理、上下文约束与端到端流程控制,实现LLM从‘不可控答案生成器’向‘受控协作者’的转型。技术原理上,它依赖协议适配、数据清洗、错误分类与动态路由等能力,价值在于弥合业务意图与系统执行之间的鸿沟,保障输出合规、可审计、可回溯。典型应用场景包括合同智能审核、供应链异常预测、跨系统客服知识协同等高敏业务流程。本文聚焦MuleSoft作为AI编排中枢的工程实践,深入解析D

fanjava 472

Wireshark网络协议分析实战:从抓包到排障的完整指南

网络协议分析是理解互联网通信、排查网络故障的核心技术。其原理在于捕获并解析网络数据包,将二进制数据流按照协议规范解码为可读信息,从而透视网络交互的完整过程。这项技术的价值在于将网络行为从“黑盒”变为“白盒”,为工程师提供了精准定位问题的能力。在应用场景上,无论是学习TCP/IP、HTTP等基础协议,还是调试微服务通信、分析安全事件、排查性能瓶颈,协议分析都是不可或缺的实践工具。本文以Wireshark这一主流工具为例,深入讲解其捕获引擎、协议解码器等核心机制,并重点剖析**TCP三次握手**和**HTTP报

weixin_30907935的博客 355

ADK多智能体旅行规划器:A2A协议与本地可调试架构实战

多智能体系统(MAS)是构建复杂AI应用的核心范式,其本质在于通过职责分离、接口契约与异步协作提升系统鲁棒性与可维护性。ADK(Agent Development Kit)以标准化Agent-to-Agent(A2A)协议为基石,将每个Agent建模为具备健康检查、结构化输入输出和元数据发现能力的轻量服务,显著降低LLM与REST混合编排的工程复杂度。该框架强调本地可调试的端到端验证闭环,支持FastAPI微服务部署与Streamlit声明式UI快速集成,适用于旅行规划、资源调度、智能客服等需多角色协同决策

weixin_34408717的博客 403

Grok API本质是可编程推理服务,不是聊天界面

大语言模型API本质上是将模型能力封装为标准化的HTTP推理服务,其核心在于协议契约而非交互界面。Grok的设计严格遵循RESTful原则与SSE流式规范,强调身份认证、结构化请求体和确定性响应,技术价值体现在输出可控性、状态无依赖与JSON Schema原生支持。典型应用场景包括自动化报告解析、结构化数据生成及工程级AI集成。本文聚焦Grok作为典型代表,深入解析其API契约、认证机制与curl直调实践。

weixin_33795806的博客 389

【7】ipmi sdr & sel log

sensor type是cpu/内存/psu/fan等哪一类,sdr(sensor的数据结构)被组件监控PLDM延续,类似配置文件即静态存储,bmc根据这配置文件去展示sensor数值:温度功耗都是连续值是阈值sensor(43.1),状态型的sdr(43.2)如风扇有没有故障和在位,43.3:记一个sel日志必然对应一个sdr,但是这个sdr不想显示当前状态,只是用来记一条sel日志用的,就可以是这个类型,比compact(压缩)记录东西更少。 如下分HEADER/KEY/BODY,sensor num

持续更新ing... 1024

从虚拟机到双系统:手把手教你为Gromacs搭建最强Linux环境(含WSL2、Ubuntu22.04配置)

本文详细指导如何在Windows系统下为Gromacs分子动力学模拟搭建高性能Linux环境,涵盖WSL2和Ubuntu22.04双系统配置。通过对比虚拟机、WSL2和原生Linux的性能数据,提供GPU加速、内存优化等实用技巧,帮助科研人员提升计算效率。

weixin_30861797的博客 270

WCF+JSON vs WebService+DataSet性能实战对比

在分布式通信中,数据序列化方式直接影响系统吞吐量、内存占用与跨端兼容性。JSON作为轻量级文本协议,相比XML具有更低的标签冗余和更优的解析效率;而DataSet依赖XSD Schema的强类型XML序列化,在大数据量场景下易引发高内存消耗与CPU瓶颈。WCF通过契约驱动和可插拔序列化器(如Newtonsoft.Json)支持高效JSON传输,配合DTO模式可显著压缩载荷、提升TP99响应稳定性。该技术路径广泛适用于.NET存量系统升级、工业SCADA数据同步及移动端弱网环境下的API优化,是平衡开发效率与

dingguayi7025的博客 313

基于STM32的红外测温系统设计

为了实现本次的毕业设计,我搜集了大量的文献与资料,通过这些资料了解到红外测温的优点,与实现所需的基本器件,并设计了几个方案,最终选择了STM32作为主控芯片,为此还查阅了关于STM32的资料,在此次设计中采用的是MLX90614医用红外测温模块,通过查阅其数据手册了解其测量精度高且自带温度补偿,所以选择了该传感器作为红外测温模块,本次设计到此已经基本完成,硬件部分和软件部分的设计已基本完成。

weixin_112233的博客 1421

Java Web健身房管理系统实战:Servlet+JSP+MyBatis整合开发

Java Web开发作为企业级应用的核心技术栈,基于Servlet和JSP的MVC架构模式实现了业务逻辑与表现层的分离。其工作原理是通过Servlet容器处理HTTP请求,JSP负责视图渲染,结合JDBC或ORM框架完成数据持久化。这种分层设计的技术价值在于提升代码可维护性和团队协作效率,广泛应用于电商、OA、CRM等管理系统开发场景。以健身房管理系统为例,该项目融合会员管理、课程预约等核心模块,通过MyBatis实现数据操作,Bootstrap构建响应式界面,完整演示了Java Web技术栈在实战项目中的

weixin_30251829的博客 291

科研党必看!Zotero+Claude3插件实战:如何用AI高效阅读文献(附详细配置步骤)

本文详细介绍了如何通过Zotero与Claude3插件的深度整合,实现科研文献的高效阅读与管理。从环境配置到核心功能实战,包括智能摘要生成、精准学术翻译和论文写作辅助等,帮助科研人员大幅提升工作效率。特别适合需要处理大量文献的研究者使用。

o0p1q2r3的博客 433

逆向工程师视角:拆解DataDome滑块验证码的3层防护机制与绕过思路

本文从逆向工程师视角,深入剖析DataDome滑块验证码的三层核心防护机制。第一层通过动态加密参数实现会话绑定与抗重放;第二层采集TLS指纹、鼠标轨迹动力学等多维行为数据进行一致性验证;第三层则是基于机器学习的后端异步风险决策引擎。文章不仅拆解了其技术原理,更分享了模拟、钩取等超越单纯工具调用的底层分析与绕过思路。

f6g7h8i9j的博客 730

Nginx反向代理Harbor镜像仓库:从原理到实践的完整配置指南

反向代理是Web服务架构中的核心组件,它作为客户端与后端服务器之间的中介,负责接收请求、转发并返回响应。其工作原理是通过配置规则,将外部请求透明地导向内部服务,实现请求的负载均衡、安全隔离和协议转换。在容器化和DevOps实践中,这一技术价值尤为突出,它能统一入口、简化网络拓扑、提升安全性,并为持续集成/持续部署(CI/CD)流水线提供稳定可靠的服务访问层。企业级容器镜像仓库Harbor的部署常需通过Nginx进行反向代理,以满足统一域名访问、SSL/TLS卸载及访问控制等实际需求。本文聚焦于**Nginx

weixin_30797199的博客 416

鸿蒙开发实战项目(九十二):HUAWEI Health血压测量

是华为开发的用于运动健康领域的一个开放平台, 三方APP可以借助HUAWEI Health开放平台提供的。

斌擎科技 1132

Spring Boot 3 + Vue 3 全栈健身管理系统开发实战

全栈开发是当前企业级应用构建的主流模式,它要求开发者同时掌握前端与后端技术栈,实现从用户界面到数据存储的完整业务闭环。其核心原理在于前后端分离架构,通过RESTful API进行数据交互,实现关注点分离和团队高效协作。掌握全栈开发能力对于计算机专业学生和开发者而言,具有极高的技术价值,不仅能深入理解软件系统整体运作,还能独立完成从需求分析到部署上线的全流程项目。在应用场景上,全栈技术广泛应用于各类管理系统、电商平台和社交应用开发。本文聚焦于**健身管理项目**这一经典毕设选题,手把手教你使用**Spring

weixin_34406086的博客 295

10.28华为OD机试真题 新系统 - 社交网络消息转发 (Java/Py/C/C++/Js/Go)

10.28华为OD机试真题 新系统 - 社交网络消息转发 (Java/Py/C/C++/Js/Go)

算法大师! 416

YOLO26 旋转框检测 OBB 技术:角度预测与解码优化

YOLO26旋转框检测技术通过CSL角度编码有效解决了OBB检测中的周期性问题。该技术采用5参数表示法(cx,cy,w,h,θ),在检测头中分别处理分类、回归和角度预测。核心创新点包括:1)使用高斯或三角窗口的CSL编码对角度进行平滑表示;2)通过加权平均解码角度,避免边界不连续问题。该方法在遥感、文本检测等需要精确方向信息的场景中表现优异,相比传统HBB框可提升定位精度30%以上,同时保持了YOLO系列的高效特性。

一键难忘的博客 522

大模型推理层归零:Claude 3.5 Sonnet 的零延迟抽象实践

在大语言模型服务架构中,‘推理’正从显式可调的独立模块,演变为隐藏于协议底层的确定性基础设施。其核心原理是将传统服务端的token调度、KV Cache管理和错误处理,迁移至客户端与传输层,依托硬件级时钟、HTTP/2语义化头字段和微秒级流控实现低抖动响应。这一转变显著降低运维复杂度与GPU资源依赖,提升端到端体验稳定性,尤其适用于企业级客服、实时对话等对首字延迟(TTFT)和token间隔抖动敏感的场景。Claude 3.5 Sonnet正是该范式的首个大规模工程落地,标志着LLM服务栈进入‘隐性分层坍缩

weixin_30256901的博客 412

交换机端口模式详解:Access、Hybrid、Trunk

交换机是网络中至关重要的组件之一,用于连接各种设备并启用数据的高效流动。为了更好地管理和控制网络流量,交换机提供了不同的端口模式,其中包括Access、Hybrid和Trunk。本文将深入探讨这三种端口模式,详细解释它们的配置、特性和应用场景,以帮助网络管理员更好地理解和优化网络架构。

网络技术联盟站 4015

MuleSoft+LLM企业级AI编排:构建安全可控的智能工作流中枢

大语言模型(LLM)具备强大的自然语言理解能力,但其在企业环境中的落地受限于协议兼容性、数据语义断层与业务流程不可见性等核心挑战。企业级集成平台如MuleSoft,通过标准化API治理、多系统协议适配、细粒度权限控制与结构化流程编排,为LLM提供可信的数据通道与合规执行环境。其技术价值在于将LLM从‘自由对话接口’升级为可审计、可调度、可熔断的AI工作流引擎,支撑采购审批、客户360、合同分析等高价值场景。本文聚焦MuleSoft驱动的AI编排实践,深入解析意图识别、分层调度、Prompt工程与安全加固等关

Ha12312的博客 374

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

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

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

Anthropic Claude 3.5 归零架构:系统提示压缩与推理时上下文裁剪实战指南

大型语言模型(LLM)的推理稳定性与上下文处理能力,长期受限于外部编排栈(如RAG、Agent路由、自定义工具链)带来的工程复杂性与调试成本。随着模型原生支持system prompt压缩、inference-time context pruning等机制,传统‘中间层’正被折叠进模型推理流——这并非功能增强,而是范式迁移:将多步意图解析、动态上下文关联、原生动作映射等能力内化为模型固有行为。技术价值在于显著降低端到端延迟、提升意图遵循率、消除分布式协调开销;典型应用场景包括金融合同比对、跨文档税务分析、参

congdi7904的博客 723

深度学习工具包 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&#39;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 = &quot;R. B. Palm&quot;, title = &quot;Prediction as a candidate for learning deep hierarchical models of data&quot;, year = &quot;2012&quot;,}```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(&#39;DeepLearnToolbox&#39;));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(&#39;state&#39;,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&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,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 = &#39;sigm&#39;;%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 &lt; 0.10, &#39;Too big error&#39;);```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(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;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)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;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 &lt; 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% 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&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 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&lt;0.12, &#39;Too big error&#39;);```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(&#39;state&#39;,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 &lt; 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,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 &lt; 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,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 &lt; 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % 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 &lt; 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % 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 &lt; 0.1, &#39;Too big error&#39;);%% 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(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % 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 &lt; 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free &quot;Bitdeli Badge&quot;)

如何识别AI模型虚假版本号并验证真实能力

在大模型技术评估中,'GPT-5.5''Claude 4.7'等带小数点后两位的版本号常被误作真实技术标识,实则多为营销虚构或微调分支伪装。其本质是脱离可验证基准的叙事竞争,根源在于模型标识缺失统一标准、评估协议不一致及测试数据污染。真实技术价值需回归HTTP响应头中的x-model-id、业务场景驱动的BIWS加权评估、私有基准测试与生产环境A/B灰度验证。本文聚焦开发者可立即落地的四步信号提取法——从API抓包验真、响应头监控、场景化benchmark构建到模型健康度仪表盘,帮助工程师在信息噪声中锚定可

weixin_34056162的博客 378

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

上一篇: HTTP1.1 Notes 1, Terminology & ABNF
下一篇: HTTP1.1 Notes 5, Connections
hidetobj
博客等级 码龄19年 16粉丝 301原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值