COMP2240/COMP6240 - Operating Systems

烽火HG680-LC刷机后体验:当贝纯净桌面+讯飞语音,老盒子秒变智能电视的折腾记录 本文详细记录了烽火HG680-LC机顶盒刷机后的使用体验,通过安装当贝纯净桌面和讯飞语音助手,老盒子焕发新生,实现无广告、快速响应的智能电视功能。文章对比了刷机前后的性能差异,分享了影音播放、语音控制等实用功能,并提供了ADB调试和问题解决的实用技巧,帮助用户将闲置的运营商盒子变身为高性能的智能影音中心。 阅读详情

School of Information and Physical Sciences

COMP2240/COMP6240 - Operating Systems

Assignment 2 (15%)

Submit using Canvas by 11:59 pm, Friday 27th September 2024

Tasks:

Problem 1, and 2 are both COMP2240 & COMP6240 students.

Problem 3 is only for COMP6240 students.

Problem 1: MAC Management

In a large modern hospital, the two emergency departments (ED1 and ED2) are located in the East and South wing, respectively, and the central supply rooms (CSR1 and CSR2) for those two EDs are located in the West and North wing, respectively. The hospital uses autonomous carts, called MAC (Medical-supply Automated Cart), for transporting medicine, equipment and supplies between the EDs and CSRs.  Trail 1 and Trail 2, which connect CSR1 with ED1 and CSR2 with ED2, respectively, intersect with each other. The partial layout of the hospital with two EDs, two CSRs and their trails are shown below.

MACs are simple autonomous carts which iteratively travel back and forth in the same trail, carrying ‘Stock ’ in their trip from CSR to ED and return ‘Empty ’ in the return trip. Each MAC has a unique number for identification but its status changes between ‘ Stock ’ and ‘Empty ’ depending on the direction of the trip. After initial setup, it was immediately identified that MACs operating in both trails can collide in the intersection,  therefore, the hospital employed you to solve the problem. The assigned task is as follows:

1.   The intersection can become deadlocked if two MACs from different directions enter the intersection (MACs can only go forward). Collison is evident if more than one MAC enter the intersection simultaneously. So, for safety purpose, not more than one MAC is allowed to enter the intersection.

2.  The solution should be starvation free. I.e. a stream of MACs from any one direction should not prevent MACs from other directions to cross the intersection.

3.  There are three checkpoints (sensors) in the intersection to which each MAC reports. Add 50 ms delay after each checkpoint to simulate the time to pass the checkpoint. The system keeps track of MACs passing in both trails (i.e. counts everytime a MAC in a trail crosses the intersection).

4. Loading and unloading of supplies happen instantly (i.e. the assumption is no time is required) after a MAC crosses the intersection.

Using semaphores, design and implement an algorithm that prevents deadlock. Use threads to simulate multiple  concurrent MACs  and  assume that the group of MACs  are iteratively  attempting to use the intersection from all four directions, i.e. CSR1 → ED1, ED1 → CSR1, CSR2 → ED2 and ED2 → CSR2.

Your program should input parameters at runtime to initialise the number of MACs from each direction and  the number of intersection crossings for MACs. For example, the input “ CSR1=1, CSR2=2, ED1=1, ED2=1, N=2” indicates that the simulation should start with 1, 2, 1 and 1 MACs starting from CSR1, CSR2,  ED1 and ED2, respectively, and each of the MACs should stop after crossing the intersection 2 times. MACs  should be numbered continuously (i.e. as MAC-1, MAC-2 etc.) starting from CSR1 then CSR2, ED1 and  ED2. Depending on whether a MAC is going towards the ED or towards the CSR it’s status will be “Stock” or “Empty”, respectively.

Sample Input/output for Problem 1.

Input: Your program will read all information from an input file, e.g., P1-1.txt (taken via command line argument).

The input will be as follows:

CSR1=1, CSR2=2, ED1=1, ED2=1, N=2

The input indicates that the program is initialized with 1 ‘Stock’ carrying MAC from CSR1, 2 ‘Stock’ carrying MACs from CSR2, 1 ‘Empty’ MAC from ED1 and 1 ‘Empty’ MAC from ED2 which will cross the intersection for two times (N=2) going between CSRs and EDs and changing status accordingly. The MACs  will be numbered as follows, from CSR1 (MAC-1), from CSR2 (MAC-2 and MAC3), from ED1 (MAC-4) and from ED2 (MAC-5).

Output: The output from one execution is as follows:

MAC-1 (Stock): Waiting at the Intersection. Going towards ED1 MAC-4 (Empty): Waiting at the Intersection. Going towards CSR1 MAC-5 (Empty): Waiting at the Intersection. Going towards CSR2 MAC-3 (Stock): Waiting at the Intersection. Going towards ED2 MAC-2 (Stock): Waiting at the Intersection. Going towards ED2 MAC-1 (Stock): Crossing intersection Checkpoint 1. MAC-1 (Stock): Crossing intersection Checkpoint 2. MAC-1 (Stock): Crossing intersection Checkpoint 3. MAC-1 (Stock): Crossed the intersection. Total crossed in Trail1: 1 Trail2: 0 MAC-4 (Empty): Crossing intersection Checkpoint 1. MAC-1 (Empty): Waiting at the Intersection. Going towards CSR1 MAC-4 (Empty): Crossing intersection Checkpoint 2. MAC-4 (Empty): Crossing intersection Checkpoint 3. MAC-4 (Empty): Crossed the intersection. Total crossed in Trail1: 2 Trail2: 0 MAC-3 (Stock): Crossing intersection Checkpoint 1. MAC-3 (Stock): Crossing intersection Checkpoint 2. MAC-4 (Stock): Waiting at the Intersection. Going towards ED1 MAC-3 (Stock): Crossing intersection Checkpoint 3. MAC-3 (Stock): Crossed the intersection. Total crossed in Trail1: 2 Trail2: 1 MAC-5 (Empty): Crossing intersection Checkpoint 1. MAC-3 (Empty): Waiting at the Intersection. Going towards CSR2 MAC-5 (Empty): Crossing intersection Checkpoint 2. MAC-5 (Empty): Crossing intersection Checkpoint 3. MAC-5 (Empty): Crossed the intersection. Total crossed in Trail1: 2 Trail2: 2 MAC-2 (Stock): Crossing intersection Checkpoint 1. MAC-2 (Stock): Crossing intersection Checkpoint 2. MAC-5 (Stock): Waiting at the Intersection. Going towards ED2 MAC-2 (Stock): Crossing intersection Checkpoint 3. MAC-2 (Stock): Crossed the intersection. Total crossed in Trail1: 2 Trail2: 3 MAC-1 (Empty): Crossing intersection Checkpoint 1. MAC-1 (Empty): Crossing intersection Checkpoint 2. MAC-2 (Empty): Waiting at the Intersection. Going towards CSR2 MAC-1 (Empty): Crossing intersection Checkpoint 3. MAC-1 (Empty): Crossed the intersection. Total crossed in Trail1: 3 Trail2: 3 MAC-1: Finished. MAC-4 (Stock): Crossing intersection Checkpoint 1. MAC-4 (Stock): Crossing intersection Checkpoint 2. MAC-4 (Stock): Crossing intersection Checkpoint 3. MAC-4 (Stock): Crossed the intersection. Total crossed in Trail1: 4 Trail2: 3 MAC-4: Finished. MAC-3 (Empty): Crossing intersection Checkpoint 1. MAC-3 (Empty): Crossing intersection Checkpoint 2. MAC-3 (Empty): Crossing intersection Checkpoint 3. MAC-3 (Empty): Crossed the intersection. Total crossed in Trail1: 4 Trail2: 4 MAC-3: Finished. MAC-5 (Stock): Crossing intersection Checkpoint 1. MAC-5 (Stock): Crossing intersection Checkpoint 2. MAC-5 (Stock): Crossing intersection Checkpoint 3. MAC-5 (Stock): Crossed the intersection. Total crossed in Trail1: 4 Trail2: 5 MAC-5: Finished. MAC-2 (Empty): Crossing intersection Checkpoint 1. MAC-2 (Empty): Crossing intersection Checkpoint 2. MAC-2 (Empty): Crossing intersection Checkpoint 3. MAC-2 (Empty): Crossed the intersection. Total crossed in Trail1: 4 Trail2: 6 MAC-2: Finished.

Remark: For the same input the output may look somewhat different from run to run.

Problem 2: Hot or Iced coffee?

School of Information and Physical Sciences (SIPS), UON bought a coffee machine that can serve both iced and hot coffee for the staffs. The coffee machine has three dispensing heads which can serve three clients (staffs) in parallel. We call a staff Hot Client (H) if (s)he is looking for hot coffee and a Cold Client (C) if (s)he is looking for cold coffee. However, the machine can operate in either of its two modes (hot or cold drink) at a time. If a Hot Client has started to make coffee in the machine then the other two vacant dispersers can serve hot coffee only - a Cold Client must wait.  A client (Hot or Cold) can choose the brew strength by choosing the brew time at the beginning. So the assumptions in operating the coffee machine are

•   Hot and Cold clients cannot use the machine at the sametime.

•   No more than three clients can use the machine simultaneously.

•   Each client can choose different brew strength for her/his coffee and will take different time to brew her/his coffee.

•   A Hot client with IDy (i.e. Hy) should NOT be served before a Hot client with ID x (i.e. Hx) where x < y. And the same for the Cold clients.

Using monitor, design and implement an algorithm that ensures the operation of the coffee machine according to the above characteristics. Use threads to simulate multiple concurrent clients. Your solution should be fair - stream of Hot Clients should not prevent a Cold Client from using the coffee machine or viceversa.

Sample Input/output for Problem 2.

Input: Your program will read all information from an input file, e.g., P2-1.txt (taken via command line argument).

The input will be as follows:

9 H1 4 H2 5 H3 3 C1 5 C2 3 C3 2 C4 2 H4 3 H5 2

Where the first line contains the number of clients looking for coffee and each subsequent line contains information about each client in the following form.

Client-ID   Brew-Time

Client-ID: The first character is H or C indicating hot (H) or cold (C) coffee client,a number (without no blank in-between) indicating the client ID in each group. Client-IDs are unique.

Brew-Time: The time to brew his coffee.

The order of clients in the input file indicates the order in which they arrived for coffee.

Output: The output should be as follows:

(0) H1 uses dispenser 1 (time: 4) (0) H2 uses dispenser 2 (time: 5) (0) H3 uses dispenser 3 (time: 3) (5) C1 uses dispenser 1 (time: 5) (5) C2 uses dispenser 2 (time: 3) (5) C3 uses dispenser 3 (time: 2) (7) C4 uses dispenser 3 (time: 2) (10) H4 uses dispenser 1 (time: 3) (10) H5 uses dispenser 2 (time: 2) (13) DONE

Each line contains information about the usage of the coffee machine by a client. First, the time the client starts using the coffee machine in parenthesis. Then his/her Client-ID, the disperser number in which she/he is operating and her/his brew time in parenthesis.

Last line shows the time to serve all the clients.

Remark: If more than one client are dispatched at the sametime, then those maybe assigned to different dispensers from run to run.

Problem 3: Additional Task For COMP6240 Students Only [NOT for COMP2240 students]

In addition to the above simulations, you need to write a report on the software approaches to mutual exclusion.

Objective: In lecture, two algorithms, namelyDekker’s algorithm and Peterson’s algorithm, were discussed as software approaches to mutual exclusion. A couple of other algorithms exist in the literature for the same purpose. The objective of this assignment is to conduct a detailed research and analysis on the various software approaches to mutual exclusion.

Description: You are tasked to perform. a survey on the software approaches to mutual exclusion and prepare a report on that. Your survey should include at least four different algorithms (may or may not include the above two). You should discuss the design principle, suitability of generalisation for n processes, suitability for multiprocessor/multi-core environment, relative advantages/disadvantages.

Report Structure and Length: You report should contain the following sections (i) Introduction (ii)

Software approaches to Mutual Exclusion (iii) Comparative Analysis (iv) Conclusion and (v) References.   The length of the report, covering all the sections mentioned before should be 6~10 pages (A4). The report should be written in a formal academic style, with proper citations and references.

The report should be prepared based on your own research and any kind of plagiarism including use of Generative AI in preparing this report should be considered as a serious breach of academic

integrity.

1.  Submission Requirements:

Your submission must also conform. to the follow considerations.

1.1. Programming Language:

The programming language is Java, versioned as per the University Lab Environment (Note this is currently a subversion of Java 17). You may only use standard Java libraries as part of your submission.

1.2.     User Interface:

The output should be printed to the console, and strictly following the output samples given in the assignment package. While there are no marks allocated specifically for the Output Format, there will be a deduction when the result values and result format vary from those provided.

1.3.     Input and Output:

Your program will accept data from an input file of name specified as a command line argument. The sample files  P1-1.txt and  P2-1.txt (containing inputs for Problem  1 and 2 respectively)  are provided to demonstrate the required input file format. Hint: the Java Scanner Library is something you will likely want to use here!

Your submission will be tested with the above data and will also be tested with other input files.

Your program should output to standard output (this means output to the Console). Output should be strictly in the given format (see the output files below).

The sample files P1-1out.txt and P2-1out.txt (containing output for P1-1.txt and P2-1.txt respectively) are provided to demonstrate the required output (and input) format which must be strictly maintained.

If output is not generated in the required format then your program will be considered incorrect.

1.4. Use of Generative AI

For completing the programming component of this assignment, you are encouraged to use Generative AI

(GenAI) tools. You must not use GenAI in preparing the reports. Please check the document “Use of

Generative AI in Assignment 2” for information, explanation and possible use cases on how such tools to be used in preparing the solution before you start working on this assignment.

1.5. Mark Distribution:

Mark distribution can be found in the assignment feedback document (Assign2Feedback2240.pdf and Assign2Feedback6240.pdf).

1.6. Deliverable:

1.   Your submission will contain your program source code for all problems, with documentation and the report (below) in the root of the submission. These files will be zipped and submitted in an archive named c9876543.zip (where c9876543 is your student number) – do not submit a  .rar, or a .7z, or etc.

2.   Your main classes for different problems should be P1.java, and P2.java and your program

will compile with the command lines javac P1.java, and javac P2.java respectively. Your program will be executed by running java P1 input.txt, j and java P2 input.txt respectively.

…where input.txt can be any filename – do not hardcode filenames or extensions!

Note: If your program cannot be compiled and executed in the expected manner (above) then please add a readme.txt (containing any special instructions required to compile and run the source code) in the root of the submission.

Please note that such non-standard submissions will be marked with heavy penalty.

3.   You should write a 2 page (A4) reflective report (name as Report.pdf) on the use of Generative AI (GenAI) in competing this assignment. In your reflective note, you should provide a detailed account of your experience and should include, but not limited to, the following elements – (i) overview of the tool(s)  used  (ii)  how  the  tool(s)  was/were  integrated  in  your  workflow  (iii)  what  was  the quality/correctness of the response generated by the tool(s) and/or how the GenAI tool(s) improved the quality of your  solution (iv) how the tool(s) improved your learning experience and problem solving skills (v) what challenges you faced in using those tools and how you solved those challenges (vi) how useful was the tool for your productivity e.g. how much time was saved by using GenAI tool(s) (vii) any ethical consideration or concerns in using GenAI tools in this assessment etc. GenAI must not be used in preparing this report.

If you did not use GenAI in preparing this assignment at all then:

You should write a brief 1 page (A4) report of the how you tested your programs to ensure they enforced mutual exclusion and are deadlock and starvation free. Specifically, your report should include discussion on edge cases you considered and behaviour of your algorithm on those cases, any specific trick/technique you applied and did you face any specific issue.

4. [COMP6240 students only] You should submit the research report (name as Research_Report.pdf) on the task in Section 3. GenAI must not be used in preparing this report.

NOTES:

a)  Assignments submitted after the deadline (11:59 pm 27th September 2024) will have the maximum marks available reduced by 10% per 24 hours.

b)  If your assignment is not prepared and submitted following above instructions then you will lose most of your marks despite your algorithms being correct.

c)   If you have been granted an extension, please include a copy of the extension approval in as a PDF document, called Extension.pdf, and place this in the root of your submission, along with your other documents and code.

【推荐100个unity插件】帮助你快速开发一款FPS游戏—— FPS Framework FPS Framework 快速入门指南 FPS Framework 是一个 Unity 开发框架,可加速 FPS 游戏开发。主要功能包括: 第一人称控制器:基于 Character Controller 实现,提供移动、跳跃、下蹲等功能,支持自定义参数调整 渲染管线转换:内置 RP 转换器,支持 URP/HDRP 等渲染管线一键切换 库存系统: 采用双列表管理:物品列表(Items)和可收集物列表(Collectables) 支持自定义库存物品和可收集物类型 提供拾取/丢弃功能实现 快速开始: 通过预制件 阅读详情

相关推荐

告别Keil?在Mac上配置STM32CubeIDE + CMSIS-DAP调试器全攻略(含常见报错解决)

本文详细介绍了在Mac平台上配置STM32CubeIDE与CMSIS-DAP调试器的全流程,包括硬件准备、软件安装、工程创建及调试优化。通过实战指南,帮助开发者高效完成STM32开发,解决常见报错问题,提升开发效率。

weixin_30485379的博客 434

COMP2240/COMP6240 - Operating Systems 2Java

esg Systemstakenviaargument).Icedcoffee?y(i.e. Hyx(i.e. Hx) wherexytakenviaargument).nts Only[andmayormaynotincludetheabovetwonNotethisiscurrentlyacontaininginputsforProblem 1and2to。

wechat99515681的博客 832

通达信抓波段指标(主图)

VAR3:=IF(INBLOCK('科创板'),VART20,IF(INBLOCK('创业板') AND DATE>1200823,VART20,IF(INBLOCK('ST板块'),VART5,VART10)));VAR5:=IF(INBLOCK('科创板'),CT20,IF(INBLOCK('创业板') AND DATE>1200823,CT20,IF(INBLOCK('ST板块'),CT5,CT10)));曾涨停/紫色细K线:青字"炸",涨停未封住。曾跌停/蓝色细K线:红字"撬",跌停被打开。

q125500612的博客 2145

小白一键部署:VoiceStudio 本地语音工作室(Linux/Win/Mac)

VoiceStudio 是破十万星的开源本地语音工作室。本文在 Debian 13 实机用官方一行命令装上 0.5.7,记录 GPU 崩溃启动参数、Install local runtime、模型许可,以及 CPU 上 Voice Design 合成 7 秒 demo。与只做听写的 Hex 互补。

m0_56699208的博客 202

京东商品多维特征提取:基于时空大模型的实时库存预测接口设计

在电商行业,库存管理是供应链的核心环节之一。库存水平过高会导致资金占用、仓储成本增加,而库存水平过低则可能引发缺货风险,影响客户满意度和平台声誉。京东作为中国领先的电商平台,拥有海量的商品数据和复杂的业务场景,传统的库存预测方法难以应对市场动态变化和业务需求。时空大模型作为一种融合时间序列分析和空间特征提取的前沿技术,能够捕捉商品多维特征在时空维度上的变化规律,为实时库存预测提供更精准的决策依据。

FB13713612741的博客 955

蛋白质组学进阶指南 | (八)差异蛋白筛选与功能解析实战

本文是蛋白质组学差异蛋白筛选与功能解析的实战指南。详细讲解了如何利用R语言的limma包进行差异表达分析,结合FDR校正和差异倍数设定筛选关键蛋白,并通过火山图可视化结果。进一步介绍了使用clusterProfiler进行GO与KEGG功能富集分析,以及利用STRING数据库和Cytoscape构建蛋白互作网络以识别枢纽分子,最终串联分析形成可验证的生物学假说。

weixin_29208077的博客 749

Mac 和 Windows 虚拟机怎么共享文件?用 UVM 设个共享文件夹

在 UVM 选择 Mac 共享文件夹,从 Windows 的「此电脑」打开共享盘,验证双向读写。文末附 UVM 简介与官方下载入口。

hsduren的专栏 149

数控系统(CNC)系列:Fanuc 31i-B_(5).基本操作与编程

Fanuc 31i-B 系统使用 G 代码和 M 代码进行编程。G 代码主要用于控制机床的运动,M 代码用于控制辅助功能,如冷却液开关、主轴启动等。G 代码:用于指定机床的运动方式。例如,G00 用于快速定位,G01 用于直线插补,G02 用于顺时针圆弧插补,G03 用于逆时针圆弧插补。M 代码:用于控制机床的辅助功能。例如,M03 用于启动主轴顺时针旋转,M05 用于停止主轴,M08 用于开启冷却液,M09 用于关闭冷却液。

2401_87715305的博客 1769

OpenClaw Mac mini部署教程:接入飞书、AI Agent与公网访问

OpenClaw Mac mini部署教程:接入飞书、AI Agent与公网访问

wei_shuo的博客 1万+

Unity如何实现3D物体拆解组装

最近有一个需求,是做一个发动机的拆卸和安装功能,其实是一个很简单的功能,但是其中有一个点我觉的非常有意思,就是拖拽组装时,物体如何精准拖到目标位置,思路有了,但是我一直找不到实现方式,早晨刷牙时无意间想到了叉乘,我才有了解决方案。就凭这一次的灵光乍现,也很有必要写篇博客来记录一下。首先,我们先来看下我们要实现的效果,就是对一个发动机(任意多组件物体,如:车)的360°预览查看,手动拖拽拆解,手动拖拽组装。360°旋转视角远近拉伸视角点击拖拽拆卸拖拽组装。

TxNet 1万+

Claude Code 任务编排 头脑风暴与 疯狂拷问:Superpowers vs Grill-me 硬核对比与工程落地

Superpowers和Grill-me是AI编程中的互补工具:Superpowers提供工程化开发流程(从需求梳理到代码审查),确保规范执行;Grill-me通过持续追问帮助厘清需求,避免方向偏差。两者结合形成"构思-拷问-执行"工作流,前者负责方案生成与落地,后者专注需求审查。根据场景选择:个人项目可用Grill-me快速澄清需求,企业项目推荐Superpowers全流程,复杂开发则建议组合使用。它们分别解决"如何落地"和"是否对齐"的问题,共

十年老程序猿,AI 疯狂研究专家,前沿硬核知识分享 331

WebStorm macOS 安装调优与实战效果全景

本文以实测视角展示 WebStorm 2025.3 在 macOS 上的极致体验:原生 arm64 启动仅需 3–5 秒,Islands 主题显著提升标签页辨识度,AI 全行补全精准响应,正确排除 node_modules 后索引时间压缩至 30 秒内,重命名重构时静态引用清晰呈现。通过真实项目流程验证其在 React + TypeScript、Vue 3 + Vite 中的高效开发闭环。文末明确适用边界——适合中大型项目与深度开发者,对轻量级或简单脚本场景优势有限。

独坐一隅,凝神遐想,是种幸福! —— 独隅 60

复旦微实现串口在线升级BOOT.BIN

将该 demo 生成的 app(升级用)和 fsbl、最简化 bit 文件(可选)打包成 BOOT.BIN,作为 golden image 烧写在 qspi flash 偏移 0 地址开始的位置,其中最简化 bit 文件为在线升级功能提供必要的物理通道(如果不需要,可以不打包该文件),golden image 一旦发布基本不需要进行升级,由该 golden image 负责和上位机进行通信交互,完成业务 app、业务 bit 文件、uboot 以及操作系统 image 等文件在线升级,在qspi flash

wangjie36的博客 3175

组网第64课:802.1X 与准入——三角色、Guest VLAN、MAC 认证、哑终端准入

2021 年一个制造客户,接入层四十多台交换机,端口全是默认开放。会议室墙上留了四个网口给投影和视频会议,平时没人管。某天流量监控报警:办公网里有台设备在扫 ,一小时扫了三百多个地址。顺着 ARP 表往上找,端口在会议室,MAC 不在资产台账里。到现场一看,一台不属于公司的笔记本插在墙插上,外包人员来开会顺手插的,插上就拿到了办公网 IP,直接能访问文件服务器。IT 负责人跟我说了句大实话:“我们没做过准入,端口插上就能用。”这就是准入要解决的问题。不是"防黑客"这种空话,是很具体的三件事:谁能接进来、接进

qq_36765170的博客 289

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

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

WebStorm macOS 安装部署与高效调优完全指南

本文为 WebStorm 2025.3/2026.1 在 macOS 上的安装与调优指南,针对零基础开发者,涵盖系统检查、dmg 安装、首次配置、快捷键迁移、Node.js 环境关联、调试实操及性能优化。重点澄清“右键排除 node_modules 无效”“nvm 用户需手动指定路径”等常见误区,提供内存调优、索引排除、插件精简等实战技巧,助用户构建高效稳定的前端开发环境。附常见报错排查表与资源链接,可快速上手并持续优化。

独坐一隅,凝神遐想,是种幸福! —— 独隅 444

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

电脑自带录屏功能怎么带声音?Windows 与 Mac 完整设置指南

Windows 用户优先用 Xbox Game Bar 或 Windows 11 截图工具,在音频面板里同时打开系统声音和麦克风即可;Mac 用户用 QuickTime 或 Shift + Command + 5 可以轻松录到人声,但要录系统内部声音需要额外配置虚拟音频设备,或者安装专业录屏软件。记住「系统声音」和「麦克风声音」是两套独立开关,分别确认,基本就能解决绝大多数录屏无声的问题。

xiaolu12388的博客 166

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

GitHub 今日推荐|Stela:在 PC 上直接启动 macOS 的翻译层

Stela 让 x86-64 PC 通过 UEFI 启动 macOS,用 Rust 实现 ARM64 到 x86-64 指令翻译和 NVIDIA Metal 驱动,模拟 M2 Mac mini 硬件环

wfly blog 281

截图快捷键不生效、被占用怎么办?Mac 和 Windows 的排查顺序

截图快捷键按了没反应,常见原因是同一个组合键已被聊天软件、输入法、系统功能或另一款截图工具占用,或者软件没有在后台运行、缺少系统权限。本文按「先确认谁在响应、再查冲突、最后改键」的顺序,给出 macOS 和 Windows 上的排查办法,并说明如何选一个不容易撞车的组合。macOS、Windows 和鸿蒙 OS 上的 InSnap 都可以在设置里自定义截图快捷键。

BingMao_Tp的博客 231

两台 Mac 拼成推理池,加机器不加内存

11 月 11 日,Apple 通过子公司 Claris 放出了 Harbor 的预览,两台用雷雳 5 连起来的 Mac 能自动组网,把各自的内存汇成一块统一的推理资源。这件事方向我有兴趣,但不用等预览资格,手边两台 Mac 今天就能用 Ollama 拼出同款逻辑。先把一个误区说清楚,省得后面白算账。

m0_58155849的博客 165

不用降低系统安全策略,也能在 Mac 上写入 NTFS 的方法

FSKit 是苹果官方主推的新一代文件系统扩展技术,也是未来 NTFS 读写工具的主流发展方向,只是推出时间不长,很多开发者和用户还不够熟悉。一旦调低启动安全性,整台电脑的安全防线都会放宽,不是仅针对硬盘读写工具生效,为一块移动硬盘牺牲整机安全性性价比很低。老牌 NTFS 读写工具底层依赖内核扩展,这类程序运行在系统最底层,拥有极高权限,今天就来说说不用降低系统安全策略,也能在 Mac 上写入 NTFS 的方法。

candlelight的专栏 287

Mac上装了最新版本的Android Studio,但是没找到jdk的设置选项也没找到jbr的目录

新版Android Studio(2025.3.1+)因三项变更导致常见问题:一、JDK设置移至“DaemonJVM criteria”,新项目默认自动探测或下载JDK;二、JBR目录改名为带版本号的jbr-21等,需进入.app/Contents/查看,或通过About窗口确认运行时;三、命令行缺adb因platform-tools未加入PATH,需在SDK Manager中勾选并配置~/.zshrc中的ANDROID_HOME及PATH。重装或清理残留可解决缺失问题,切勿手动设JAVA_HOME或安装冲

Programming is a highly artistic endeavor 399

macOS 27.3 完整磁盘访问机制变更:FDA 不再自动添加授权条目

macOS 27.3 Beta 内置 TCC/FDA_WARNING 功能标记,开启之后,应用尝试读取受保护系统文件时,系统直接静默拒绝访问,不再将程序写入 TCC 权限数据库,软件也就不会自动出现在「完整磁盘访问」列表。本文记录该底层改动、新旧权限流程差异、手动授权步骤、高频踩坑点,同时介绍处于开发阶段的 Private Folders 细粒度文件夹权限方案。

candlelight的专栏 355

没有无障碍树,桌面应用怎么做真机 E2E 测试:macOS 坐标点击加像素断言的完整做法

没有无障碍树的桌面应用,E2E 不是不能做,只是要把"地图"换成"坐标 + 像素":CGEvent 发事件、screencapture 截图、PIL 数像素。完整做法是五步:定五层架构和用例总表 → 写合成事件工具链(60ms 间隔、arm64 按值传、拖动用 Dragged、键盘走 CGEvent、防睡眠断言)→ 像素断言(实测阈值、工具栏自动定位、三层坐标换算)→ 测试隔离与可观测性(空白工作区、

遇码开源社区 238

【Linux网络编程】计算机网络基础:局域网与广域网、OSI七层模型与TCP/IP五层模型、封装解包与MAC/IP地址、端口号与socket编程接口

本文系统讲解Linux网络编程基础,涵盖局域网与广域网概念、OSI七层与TCP/IP五层模型对比,深入解析数据封装/解包过程,阐明MAC地址(局部寻址)与IP地址(全局定位)的区别,结合端口号实现进程级通信,并介绍socket编程接口的核心机制。通过分层设计思想,揭示网络通信本质为“进程间通信”的远程延伸,为后续深入学习奠定坚实基础。

分享 AI 时代程序员的进阶之路:大模型应用、AI 编程工具实战,同时沉淀 C / Linux 底层技术笔记。与君共赴,万里征途。 988

macOS 10 、Docker 玩轉 MySQL

本文介紹如何在macOS 10.14上使用Docker Desktop運行MySQL 8.0。透過docker pull mysql/mysql-server:8.0下載鏡像,並以docker run啟動容器,映射3306埠實現外部連接。預設root密碼需從日誌中提取,可通過環境變數MYSQL_ROOT_PASSWORD設定自定密碼。若需外部連線,可修改root帳號host或建立新使用者。資料儲存於Docker Volume,路徑位於/var/lib/docker/volumes/,macOS使用者需進入L

csdn_aspnet的专栏,请点击博客主页右上角三个点中的私信联系 316

[git]一次 Git push review 导致 Mac 卡死:10GB 仓库、自动 repack 与大文件 delta 压缩

日期:2026-11-15环境:macOS / Git 2.54.0 (Apple Git-157) / 24GB RAM / 12 CPU+ 子模块(Gerrit 评审流程)

AsiWorld的博客 222
上一篇: CS1112 Specific programming constructs
下一篇: CEG 2136 Arithmetic Logic Unit
vx___codinghelp
博客等级 码龄2年 778粉丝 101原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值