[ZZ]CSS FRAME WORK – A SURVEY AND INTRODUCTION

[性感网页设计].Sexy.Web.Design.Creating.Interfaces.that.Work(2) 如果是您负责的设计网站外观,用户界面, 你是一名网页设计师,那么这本书是给你的。 无论您是全新的网页设计,丰富的职业寻找灵感,或开发要改善您的网站的美观,任何人都在这里都可以学到。因为这不是在试图掩盖一切可能的领域创造了一个网站,而是集中于纯粹的设计阶段; 也就是说,一切都发生在一个单一的代码行书写前。 然而,伟大的设计不仅仅是美学。不久我们开放我们的绘图程序选择,我们将进行研究,处理与客户,应对简报,勾画 Sitemaps的,规划的信息体系结构,从涂鸦到图表,探索不同 方式的交互性,并设计。 立即下载

[my own word 09-8-17]:其实早就听说有CSS FRAME,不过总是没有上心,总觉得用那样的东西离现在还很远,总觉得用了FRAME的东西是很庞大的,有一种负重感。然而不经意间发现,这样的观点不但是错误的而且是有害的,对于软件构件这样的思想而言是一种反缪,这些能够加强软件复用的东西实在应该是作为基本的构件被广泛采用。反过来想想对现在这种动则什么什么框架,什么什么架构的态度是既反感,却又无奈,它们让你对一部分原本应该是优秀,脱颖而出的东西产生厌倦感。然而你除了反感似乎又没办法遏制这种趋势 希望脱离我的视野的这些优秀的东西能够重新回到我的视线下。

 

Which CSS Grid Framework Should You Use for Web Design?

May 21st in HTML & CSS by Raj Dash

Ever wondered how all those slick "magazine" themes for WordPress and other platforms were created? Many, if not all, were designed using a CSS Grid Framework - at least in essence if not in actual fact. That is, you can use an existing CSS framework or build your own from scratch. While it's possible to design complex web page layouts without a framework, it's arguably an act in masochism. In this article you'll get an overview of the current batch of Frameworks and which you should choose to use.

PG

Author: Raj Dash

Raj Dash is a multi-blogger, math/computer geek, cook, composer, philosopher, former search engine webmaster, former publisher/editor, and published writer and author. You can find his hubsite at Chameleon Integration, which will lead you directly or indirectly to some of his active blogs and zomblogs.

What is a CSS Grid Framework?

Layout grids have been used in print publishing long before the Web. They're an invisible foundation used to achieve visual cohesion in magazine and newspaper page design and layout. They essentially amount to a lattice that divides horizontal and vertical space in consistent units where text, headlines, images, and advertising can be placed.

The same concept has been adapted for web page design for much the same reason, using CSS (Cascading StyleSheets) code to position HTML elements. In fact, many editorial sites run by large print media publishers do apply grids to achieve a look on their websites that's similar to their print content. Note that the vertical axis is not as well supported in CSS Grid systems, since a web page's height is not as much of an issue as for a printed page. (Still, that's a minor issue in web page design, unless you expect the same features as with Desktop Publishing - aka DTP - systems, which is difficult to support without a PostScript-like language for browsers to implement and support.)


960 CSS Grid System - one of the nicer designs for a framework website :-)

Why Use a CSS Grid Framework?

Not all designers support the use of using grid frameworks over tables, or even at all. But let's face it; there are layouts you simply can't do with just HTML tables without a great deal of painful effort - and lots of nesting that's hard to decipher, should ever have to make changes.

Sure, if you use grids, you'll have to add some necessary HTML tag markup to your content, thus increasing page file sizes. Also, this means that markup and style are not truly separated - a tenet which many web designers would like to adhere to. (Some people feel, rightly or wrongly, that naysayers of CSS frameworks are designers who are worried that the need for their services will decline. Though, with this logic, coders are in trouble, too, especially with the increase in cross-browser code libraries such as jQuery.)

The fact is, using a CSS grid framework means that your browser loads the CSS file(s) only once and keeps them cached "on the client side". Plus, the additional HTML markup needed to apply the "invisible" CSS framework is rarely so significant that bandwidth issues for readers should be a concern. (Interestingly, most of the naysayers seem to be talking about Yahoo UI Grids, not so much Blueprint.)

In most of the examples I've been working with, and in any of the magazine themes using grids that I've inspected, we're talking relatively small file size increases - especially compared to the blog platform code being used. A single large image will likely take up more space. With faster Internet connections, it really isn't such a big deal.

Design & Aesthetic Benefits

Regardless, of whether you use CSS grids for prototyping or production systems, there are multiple aesthetic and design benefits:

  1. Visual design cohesion between page elements.
  2. Uniformity and consistency in HTML element placement, thereby reducing CSS coding errors.
  3. Easier to apply the "rule of thirds" and the "golden section" to design, which results in a visually appealing layout to most human eyes.
  4. Mostly eliminates the need to use nested HTML tables.
  5. Nested sub-grids, for very complex designs that are relatively simple to produce.
  6. Easier to apply images and text callouts to produce asymmetric layouts for visual texture.
  7. Cross-browser support, so less screaming and hair pulling when you get around to testing for that bane of designers, IE. (Bill Gates must have felt so unloved as a child to have produced so much software that does what it wants, in defiance of standards that MSFT supposedly supports.)
  8. Reduced effort for producing slicker web page layouts, compared to coding the necessary CSS from scratch.
  9. Reduced future effort if you need to reposition elements or change rendering characteristics (typography, margins, etc.) for related elements en masse.
  10. Usable with static pages and CMSes/ blog platforms.
  11. Enables the popular use of creating "magazine" and premium themes for blog platforms. (WordPress seems to be the platform that CSS frameworks are most often used with, though any other platform that allows referencing a JavaScript source file should work just fine.)


YAML - "Yet Another Multicolumn Layout"

CSS Frameworks and Tools
Here's a short list of some of the more popular frameworks:
  1. Blueprint CSS Grid Framework. Robust despite only being in V0.7 (as of this writing), with lots of support from designers, and numerous tools for generating CSS code (beyond the standard 24-column, 950 px default framework). Supports the use of Blueprint "plugins".
  2. Yahoo! YUI Grids CSS, Grids Builder. This framework, which predates Blueprint, comes with six preset templates and four preset widths, and the layouts accomodate IAB ad unit guidelines. YUI Grids CSS is integrated with the rest of the Yahoo! UI (User Interface) Library.
  3. YAML, YAML Builder. YAML (Yet Another Multicolumn Layout) has a fair bit of maturity, is built on web standards, and is supposedly easy to use. Though it doesn't seem to have all that much use in the WordPress community. In fact, in the many hundreds of WP themes I've looked at for the last three years, I don't recalling seeing it used once. That might be because you need a license to use it with some CMSes (Content Management Systems).
  4. Grid Designer. This is a web tool for generating custom CSS grids. It uses its own CSS classes, so it could be said to be a framework, though it's not as well support in the design community as some of the others.
  5. 960 CSS Grid System. This system is based on a page width of 960 pixels, which is a number that's divisible by many other numbers, making it "a highly flexible base number to work with." However, 960 Grid only works with 12 or 16 columns.
  6. CSS Boilerplate. Produced as a stripped down framework by one of the original Blueprint authors.
  7. Sparkl. The documentations says you can create 1-, 2-, or 3-column pages, but the samples suggest you have more flexibility.
There are other CSS Grid frameworks you can find listed in Google Code, but of the three or four more that I looked at, most were incomplete in terms of documentation or even project files, so I've left them off. If you know of a framework not listed, please do let us know in the comments!
Comparison

Let me point out that this is not a comphrensive comparison of CSS frameworks. In fact, I've not used anything extensively other than Blueprint, though I've scanned docs for all of the frameworks listed above and played a bit with YAML and Grid Designer. Blueprint, YUI Grids, and YAML are arguably the "big three" in the CSS framework space, and 960 seems to be a solid fourth choice.

In choosing a framework, I've taken into account that I'm not a trained designer - beyond what I've studied on my own for years. I do dabble in design when necessary, albeit in a very minimalist form. In fact, because I spent quite a few years either publishing my own print magazine or working on others, I did a fair bit of (really bad) page layout using the principles of grid design working with Adobe PageMaker. So I find it very natural to work with CSS Grids for web design. It seems that given the number of WordPress themes out there - see the list at end of this article - that are based on a grid framework (mostly Blueprint), designers feel pretty comfortable with grids, too.

Nevertheless, with time always limited, I need something easy to learn and use, yet robust. I've found that Blueprint CSS Grid suits my needs. It integrates nicely with various JavaScript libraries - including jQuery, which can result in some damn sexy web interfaces. It renders well (though not 100% perfectly) in most browsers - though you need to test for that big thorn in web designers' sides, IE browser.

Based on my loose research of CSS Grids this last year, Blueprint seems to be the most robust framework, the least restrictive, the most supported - in terms of how widespread its use is - the smallest in size, and the framework with the most tools. In fact, the beauty of Blueprint is that you can very quickly produce the CSS code for a custom framework using tools like Kematzy's Blueprint Grid CSS Generator. Though you can do this with Grid Designer, a quick comparision would suggest it's not as robust as Blueprint.

On the flipside, scanning and browsing the documentation for Yahoo! UI Grids CSS framework leads me to believe that if you just want to do some simple web page layout and want a handful of presets to play with, you might want to look into this option. However, I feel it's a bit too restrictive for my liking. (You might want to read Foo Hack's Blueprint CSS Framework vs YUI Grids.)

Ultimately, when it comes to learning something new online - such as a programming language and code library/ framework - I always apply the "shoulders of giants rule". I first shortlist the options that seem suited to what I need, then select based on how much it has been written about. Might not seem fair to newer options, but the process isn't that much more arbitrary than how many people pick web applications to use. There's too much out there to keep track, and having an existing supportive community makes a big difference.


Blueprint - My choice

Why I Picked Blueprint CSS
Blueprint CSS Grid Framework is what I'll be using in all of my tutorials at NETTUTS (when it's relevant). Instead of copying the feature list from the docs at Google Code, let me focus on why I personally picked it. Some of these points overlap with what I've said above:
  1. Relatively small file sizes. Has compressed versions for production use, for further size decreases.
  2. Print + screen stylesheets.
  3. Simple to integrate and use. (Though IE browsers are problematic, depending on which version of Blueprint is being used.)
  4. Easy to remember CSS classes and ids that are unlikely to clash with any that you're already using.
  5. Lots of support tools, especially for generating custom grids.
  6. Lots of articles/ tutorials about Blueprint, with lots of positive vibe.
  7. Lots of use of Blueprint by WordPress theme designers.
As mentioned above, I do run into IE problems - but then doesn't everyone? Several WP themes using Blueprint have resolved IE browser issues, so I'm extrapolating in my belief that they can mostly be resolved. Blueprint, as of this writing, does not support liquid layouts - something I'm not a huge fan of anyway. However, such support is apparently coming, in case you lean that way.
Sample Grid-based Design Process
Well this is a matter of choice, isn't it? Some CSS Grids come with a grid.png or even a .psd file that you can use in transparent mode in Photoshop, Fireworks, GIMP, etc., while you're laying down your design elements. I'm a bit more old school and always design my layouts by starting on paper:
  1. Block off a bounding rectangle representing an entire web page. (Do this for each page you're designing.)
  2. Partition the rectangle into smaller rectangles representing primary areas: header, footer, sidebar, content area, etc.
  3. Further partition primary areas and pencil in "atomic" design component (site, logo, rss button, recent posts, recent comments, search box, sample posts, post thumbnails, etc.)
  4. Translate that final sketch into skeleton HTML, using real text or lorem ipsum text. The HTML markup will include the necessary CSS Grid class and id values to support the layout I need.
  5. Create banners/ buttons in graphics software.
  6. Test HTML mockup in as many browsers and versions as possible. (You might need to employ a few friends if you only have one computer.)
  7. Convert text into CMS/platform code. (E.g., convert text blocks into the necessary WP function calls and PHP code.)
You'll notice that nowhere in that process is the use of graphics software for layout mockup. That's because I am not a designer and use a very minimalist approach for what I design (for myself only). But if you do plan to use, say, Fireworks for your mockup, you would do so between steps #3 and #4.
Summary
I've tried to be comprehensive in my search for CSS Grid Frameworks, scanning over 120 articles for leads. However, it's possible I've missed some options, so feel free to offer others. Whichever CSS framework you decide to use, do so because it best suits your general needs. If the pages/ templates you design will have advertising, consider what type of ads. Early on, when I picked themes for my sites, I chose for AdSense ads (which are IAB-compliant). More recently, I've been picking/ designing for blocks of 125x125 ads, which I highly prefer over most AdSense blocks. If you're interested, there is a W3C draft specification entitled CSS Grid Positioning Module Level 3 (written by two Microsoft employees) that discusses integrating grid-based layout into CSS. The features discussed in this draft could be in IE 8.
References
Related Tools
  1. Blueprint CSS AIR Grid Tool.
  2. Blueprint CSS Quick Reference (PDF, 1 page).
  3. CSS Grid Calculator.
  4. Diagnostic CSS.
  5. Reset CSS.
Some Articles or Sites About CSS Grid Frameworks
Here are links to a few of the many great articles out there about CSS Grids.
  1. 456 Berea Street - Grids, Tables, CSS.
  2. A List Apart - Thinking Outside the Grid, Setting Type on the Web to a Baseline Grid.
  3. Olav Bjørkøy - Launch: Blueprint, a CSS Framework.
  4. Mark Boulton's 5-part series, Five Simple Steps to Designing Grid Systems.
  5. Jeff Croft - What's Not to Love About CSS Frameworks?
  6. CSS Demos - Hands on With Blueprint, a CSS Framework.
  7. CSS Tricks - GridControl.
  8. Design by Grid.
  9. Cameron Moll - Gridding the 960.
  10. Smashing Magazine - Design With Grid-Based Approach, Six Creative Column Techniques.
  11. Stone Mind - First Impressions of the Blueprint CSS Framework.
  12. Subtraction - Oh Yeeaahh! (or How to Use Grid in a Layout)
  13. Tutorial Blog.
  14. Vandelay Design - 65 Resources for Grid-Based Design.
  15. W3 - CSS and Grid Layout.
  16. Web Designer Wall - Grid and Column Designs.
innovus 命令每日精要 | 掌控Innovus布线的利器——setNanoRouteMode详解 在数字IC后端设计的复杂世界里,布线优化是至关重要的一步。今天,我来给大家深入讲解Innovus工具中setNanoRouteMode命令的精妙之处,让你轻松驾驭布线策略,提升设计质量。setNanoRouteMode是Innovus中用于配置NanoRoute绕线行为的关键命令。通过其丰富的参数,你可以精细控制布局后阶段的绕线策略、信号完整性优化、工艺适配及设计规则修复等流程。下面,我将按功能分类总结其核心选项,并针对不同场景给出建议。 阅读详情

相关推荐

告别手动连接!一键搞定Mumu模拟器与Android Studio的ADB配置

本文详细介绍了如何通过编写自动化脚本,一键完成Mumu模拟器与Android Studio的ADB连接配置。告别繁琐的手动命令输入,该脚本能智能检查环境、判断连接状态并自动处理端口转发,显著提升Android开发者的调试与测试效率。

yog99的博客 495

Get Sexy Hair ----From MSN WebSite

Get Sexy Hair 10 fantastic tricks to take your hair from so-so to so-sexy. 1.Trim regularly. Fuzzy, fried ends are not sexy. 2.Add scent. When you spritz on your favorite perfume, add a light mist ...

weixin_33853794的博客 2159

【rPPG】基于多光谱摄像头的非接触式睡眠血氧监测系统(传统建模方法解析)

本文深入解析了基于多光谱摄像头的非接触式睡眠血氧监测系统,重点探讨了rPPG技术的原理、硬件设计及传统建模方法。通过多光谱摄像头捕捉皮肤微弱光学变化,实现医疗级精度的心率和血氧监测,特别适合长期睡眠监测场景。文章详细介绍了摄像头选型、照明系统设计以及PBV模型等核心技术,并对比了与传统传感器的性能差异。

weixin_30300225的博客 561

Web前端期末大作业--响应式性感美女模特博客网页设计(HTML+CSS+JavaScript)实现

响应式性感美女模特博客网站模板(HTML+CSS+JavaScript-前端大作业网页设计) 临近期末, 你还在为HTML网页设计结课作业,老师的作业要求感到头大?HTML网页作业无从下手?网页要求的总数量太多?没有合适的模板?等等一系列问题。你想要解决的问题,在专栏Html+Css+JavaScript期末大作业 都能得到解决 ...

java李阳勇的博客 1万+

使用Google Earth Engine下载JRC全球水体数据

通过Google Earth Engine平台和提供的源代码,研究人员和水资源管理者可以方便地获取和利用这一重要的水资源监测数据集,从而开展相关的研究和决策支持工作。要使用Google Earth Engine下载JRC全球水体数据,首先需要在Google Earth Engine平台上进行注册和登录。JRC全球水体数据是由欧洲联合研究中心开发的高分辨率全球水体分类数据集,覆盖了整个地球的陆地和水域。下载完成后,你可以使用各种遥感数据处理软件来打开和分析这些数据,以满足不同的研究和应用需求。

LrlDebug的博客 1157

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

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

一键难忘的博客 520

读书笔记:SEXY WEB DESIGN

1、网页是什么?界面(interface)2、网页的目标是什么?(1)网站要做什么At its basic level, that means questions like: “What is the major call to action for this site? What do we want the user to do?” At the other end of th

About Tec 1519

ZYNQ PL通过EMIO ETHE1外接PHY由GMII转RGMII

1,设置EMIO方式引出ETHE1 2,从GMII过度到RGMII GMII: 发送 gmii_tx_clk gmii_tx_d[7:0] gmii_tx_en gmii_tx_er 接收 gmii_rx_clk gmii_rx_d[7:0] gmii_rx_dv gmii_rx_er RGMII: 发送 tx_clk tx_d[3:0] tx_ctrl 接收 rx_clk rx_d[3:0] rx_ctrl 首先数据总线从时钟单边沿采样8bit转变为了双边沿采样4bit,从88E1

wangjie36的博客 1万+

sex和sexy区别

https://zhidao.baidu.com/question/1758263278980231748.html 转载于:https://www.cnblogs.com/bakblog/p/9265707.html

weixin_30408165的博客 2万+

9篇6章7节:SEER 数据库的2025年数据变量多条件组合选择(2026年版)

软件中的病例筛选功能通过CaseSelection界面实现精准研究队列构建。该界面允许用户通过变量选择(Variable)、运算符定义(Operator)和取值设定(Values)三步操作创建筛选条件,支持种族、分期等关键变量的多条件组合。

MD Code 1454

Jenkins部署前后端分离项目最全图文教程(手把手教学)

最近Jenkins部署的热度比较高,于是就想出一篇关于我是如何使用Jenkins部署前后端分离项目的,本篇记录了我是如何一步一步去配置、搭建和部署的完整流程,每一行代码都进行了实测和讲解,通过图文的教学写成博客分享给大家!

黄团团的个人博客 4777

HTML与CSS基础第八课—HTML 中如何展示图片

img src="地址" alt="替代文字">。img是空元素,没有结束标签,不要写</img>。src的写法和上一篇链接地址相同。同一文件夹写cover.png,子文件夹写,上一级写,另一台服务器写完整的https://地址。图没出现时,先看它最后拼出来的地址,和链接打不开时一样。alt是替代文字,不是图片标题,也不出现在图的旁边。图能显示时,读者看见图。图加载失败,或者读屏软件不看图、只读文字时,用的就是这句。句子要写出这张图在告诉读者什么。

专注大前端领域,持续分享React、Vue、React-Native、Flutter、跨端等领域内容 198

基于STM32L4XX 、HAL库的TMP144YFFR数字温度传感器驱动应用C语言程序设计

define TMP144_ADDRESS 0x00 // 默认为全局地址,用于单器件或MDA命令。#define TMP144_CMD_READ_TEMP 0x00 // 读取温度寄存器命令。if (temp_raw & 0x800) { // 判断第11位(符号位)

PP_Cottage的博客 91

HTML与CSS基础第七课—HTML 中的a标签(跳转链接)

a href="地址">链接文字</a>。链接文字放在开始标签和结束标签之间,写成点开以后能去的地方。a放在p里面,它不自己另起一段。a写上href才是能点的链接。不写href,字还在,点了不跳转。不写target,在当前页打开。在新窗口打开,原来这一页留着。https://是另一台服务器。同一文件夹写文件名,子文件夹写,上一级写../。本地直接打开文件时,从磁盘根目录算起。页内跳转先给目标一个唯一的id,链接写成href="#这个id"。名字对不上,就到不了。

专注大前端领域,持续分享React、Vue、React-Native、Flutter、跨端等领域内容 495

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

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

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

CSS 盒子模型与背景渐变、文字渐变实战

content(内容区):文字、图片等实际内容占据的区域padding(内边距):内容与边框之间的空白border(边框):盒子的边界margin(外边距):盒子与其他盒子之间的间距fill:#333;important;important;fill:none;color:#333;color:#333;important;fill:none;fill:#333;height:1em;margin 外边距border 边框padding 内边距content 内容区。

2601_96876853的博客 233

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

CSS 弹性盒布局:flex-wrap 换行与多行交叉轴对齐

默认情况下,弹性容器(flex container)会把所有子项(flex item)挤在一行里,哪怕空间不够也只会压缩子项,而不会换行。浏览器会依次把子项放进当前行,当剩余空间不足以容纳下一个子项的基础尺寸时,就开启新的一行。一旦允许换行,容器里就会出现多条「弹性行(flex line)」,此时交叉轴对齐的行为也会从「单行对齐」变成「多行对齐」,是默认值:当子项没有设置固定高度时,行会被拉伸,子项随之变高,看起来像是「撑满了容器」。上面这段代码中,每个子项固定 200px 宽,容器宽度决定每行能放几个。

2601_96876853的博客 516

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

CSS 弹性盒布局:主轴与交叉轴对齐详解

很多初学者容易混淆「主轴」和「交叉轴」,导致对齐属性用错方向。本文从轴向概念出发,系统梳理弹性盒布局中的对齐属性,并给出可直接运行的示例。Flexbox(弹性盒布局)是 CSS 中最常用的布局方案之一。它把容器内的子元素按一条。」这条主线,弹性盒布局的对齐问题基本就能迎刃而解。排列,并提供了两个方向上的对齐能力:沿主轴的。后,这两个属性的视觉效果会随之旋转 90°。如果只想调整某一个子元素,可以在子元素上使用。的分布,这是最容易出错的地方。组合都能实现两个方向的居中。/* 交叉轴居中 */

2601_96876853的博客 405

CSS2DObject 名称标签最小示例

在三维场景中实现随模型移动的名称标签,纯 DOM + CSS2DObject 方案兼具低实现成本、高样式与交互灵活性及良好性能。通过 document.createElement 组装带图标和文字的标签,利用 CSS2DObject 挂载并跟随模型,配合命名约定与 removeLabel 精准管理生命周期,支持点击、悬停、省略号等原生行为,避免内存泄漏,是中等规模标签场景的理想选择。

weixin_44242600的博客 281

CSS 三种引入方式与选择器全解

div p。

2401_89953644的博客 216

CSS 仿写页面

拿到设计稿先别写代码。这篇文章先讲「怎么把一张图拆成 DOM 结构」,再把颜色表示、五种尺寸单位、background的六个子属性、文字排版属性逐个落地,最后说明opacity和rgba到底差在哪。

2401_89953644的博客 187

css注意事项一

button {}踩坑场景:你写的分页按钮 hover 变色不生效,大概率是别的选择器优先级更高,把你的样式覆盖了。规避:不要随便写!important,实在要提升优先级,叠加 class,比如。不要东写一条宽、下面突然写颜色、再回头写 padding,乱序后期改样式头大。

2603_96589670的博客 412

CSS 元素类型、盒模型与 Flex 布局

想让单独设置的某条边生效,必须写在通用。

2401_89953644的博客 588

HTML与CSS基础第九课—HTML的列表

ul是没有顺序的一组:顺序换一换,意思不变,例如一门课会用到的几样东西。ol是有顺序的一组:步骤、名次、操作先后。选哪一个,先问「把两条对调,意思变不变」。li是其中一条,必须放在ul或ol里面。ul和ol的直接子内容就是这些li。ulol他们的子元素一定是li。li中,也可以包裹一组列表。但是必须放在li内部。某一条下面还可以再套一层列表。内层的ul或ol写在那一条li里面,不要写在li的外面、和别的li平级。示例里「这一项先不学」属于「JavaScript」这一条,所以套在它的li里。内层用ul。

专注大前端领域,持续分享React、Vue、React-Native、Flutter、跨端等领域内容 193

使用HTML+CSS+JavaScript实现文件上传弹窗

使用HTML+CSS+JavaScript实现文件上传弹窗

bjzhang75的博客 104
上一篇: FLASH Smoke simulation
下一篇: [zz]A Closer Look At the Blueprint CSS Framework
zinking3
博客等级 码龄20年 262粉丝 215原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值