Skip to content

【残稿】ML笔记(0):开始之前

今年,Stanford将计算机课程的公开度又向前迈了一步,将机器学习(Machine Learning)人工智能(Artificial Intelligence)数据库基础(Introduction to Databases)三门课全面在网上开放。我打算坚持学习其中的机器学习这门课程,并以笔记的形式向大家分享。

目前ML课程的主页已经可以注册(Enroll),登录后可以看到课程视频、练习题、和答疑等内容。

其中课程视频其实不用注册也可以在这个网址看到。所有的讲义在这个网址有下载。

除了ml-class网站内部的Q&A模块外,还有一个非官方的reddit上的讨论组专门进行这门公开课的信息分享和课后讨论。那边的讨论都是英文的,如果你习惯中文讨论的话,可以移步至我开设并管理的这个MLCN小组进行讨论。

大家一起学ML吧!

新学期第4周(残稿):我的理想是 Linus Torvalds

在我常上的 Hacker News 论坛上,有人这样评价 Linus Torvalds 的贡献:

I personally know a dozen people who could have written the Linux kernel, at around the time Linus wrote it. What none of them could have done, through, is manage the project when it took off the way Linus did.
I suspect 100 years from now, the place you will hear the name “Linus Torvalds” the most will be in management classes in business and engineering school. His actual software will be a footnote, merely the platform upon which he demonstrated how to manage a large open source project. Kind of like Henry Ford and the automobile–Ford made important contributions to the development of the automobile itself, but it is his figuring out how to make the automobile factory that is the main thing we remember him for.

这段话将 Linus 界定成了一个管理学天才而非简单的编程牛人。

(这篇文章在我草稿箱里躺了很久了,但一直没开始写,本来我下面想详细展开论述的,但医生不让我过多写文章,这篇文章就这样了,课后习题不布置了,你们自己看着办吧。)

《背包问题九讲》2.0 RC1

下载地址在 http://love-oriented.com/pack/pack2rc.pdf

最终话

我前一段时间用眼过度,去校医院检查后,又转诊到了浙二医院眼科中心。今天下午,去浙二,花了好多钱,做了各种各样奇妙的检查之后,诊断为干眼症,开了两瓶好贵好贵的眼药水。医生说,我再不注意用眼卫生,会有青光眼的可能,建议我休假一段时间,不要长时间看电脑。

我打算游山玩水一段时间,游玩多久要看我的病情决定,什么时候我眼睛不疼了,我就继续我的种种未竟事业。

真的很抱歉。

LLVM笔记(3):LLVM的语言(下)

(本文是 http://llvm.org/releases/2.9/docs/LangRef.html 的阅读笔记,前作为《LLVM笔记(2):LLVM的语言(中)》。)

  • Instruction Reference
    • terminator instruction
      • indicates which block should be executed after the current block is finished
      • yields ‘void’ value,
      • ret (return)
        • ret <type> <value>
        • ret void
      • branch
        • br i1 <cond>, label <iftrue>, label <iffalse>
        • br label <dest> ; Unconditional branch
        • switch <intty> <value>, label <defaultdest> [ <intty> <val>, label <dest> ... ]
        • indirectbr <somety>* <address>, [ label <dest1>, label <dest2>, ... ]
      • invoke
        • invoke [cconv] [ret attrs] <ptr to function ty> <function ptr val>(<function args>) [fn attrs] to label <normal label> unwind label <exception label>
        • unwind
        • unreachable
    • binary instruction
      • add, fadd, sub, fsub
      • mul, fmul, udiv, sdiv, fdiv, urem, srem, frem
    • bitwise binary instructions
      • shl, lshr, ashr
      • and, or, xor
    • memory instructions
      • Vector Operations
        • extractelement
          • <result> = extractelement <n x <ty>> <val>, i32 <idx> ; yields <ty>
        • insertelement
          • <result> = insertelement <n x <ty>> <val>, <ty> <elt>, i32 <idx> ; yields <n x <ty>>
        • shufflevector
          • <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> ; yields <m x <ty>>
      • Aggregate Operations
        • extractvalue
          • <result> = extractvalue <aggregate type> <val>, <idx>{, <idx>}*
        • insertvalue
          • <result> = insertvalue <aggregate type> <val>, <ty> <elt>, <idx> ; yields <aggregate type>
      • Memory Access and Addressing Operations
        • alloca
          • <result> = alloca <type>[, <ty> <NumElements>][, align <alignment>] ; yields {type*}:result
        • load
          • <result> = load <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>]
          • <result> = volatile load <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>]
          • !<index> = !{ i32 1 }
        • store
          • store <ty> <value>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>] ; yields {void}
          • volatile store <ty> <value>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>] ; yields {void}
        • getelementptr
          • <result> = getelementptr <pty>* <ptrval>{, <ty> <idx>}*
          • <result> = getelementptr inbounds <pty>* <ptrval>{, <ty> <idx>}*
      • Conversion Operations
        • trunc .. to (truncate value type)
        • zext .. to (zero ext)
        • sext .. to (sign ext)
        • fptrunc .. to (float point truncate)
        • fpext .. to
        • fptoui .. to (float point to unsigned int)
        • fptosi .. to
        • uitofp .. to
        • sitofp .. to
        • ptrtoint .. to (pointer to int)
        • inttoptr .. to
        • bitcast .. to
    • other instructions
      • ‘icmp’ Instruction
        • <result> = icmp <cond> <ty> <op1>, <op2> ; yields {i1} or {<N x i1>}:result
  • Intrinsic Functions
    • Variable Argument Handling Intrinsics
      • llvm.va_start
      • llvm.va_end
      • llvm.va_copy
    • Accurate Garbage Collection Intrinsics
      • llvm.gcroot
      • llvm.gcread
      • llvm.gcwrite
    • Code Generator Intrinsics
      • llvm.returnaddress
        • declare i8 *@llvm.returnaddress(i32 <level>)
      • llvm.frameaddress
        • declare i8* @llvm.frameaddress(i32 <level>)
      • llvm.stacksave
        • declare i8* @llvm.stacksave()
      • llvm.stackrestore
        • declare void @llvm.stackrestore(i8* %ptr)
      • llvm.prefetch
        • declare void @llvm.prefetch(i8* <address>, i32 <rw>, i32 <locality>)
      • llvm.pcmarker
        • declare void @llvm.pcmarker(i32 <id>)
      • llvm.readcyclecounter
        • declare i64 @llvm.readcyclecounter()
    • Standard C Library Intrinsics
      • llvm.memcpy llvm.memmove llvm.memset.*
      • llvm.sqrt.* llvm.powi.* llvm.sin.* llvm.cos.* llvm.pow.*
    • Bit Manipulation Intrinsics
      • llvm.bswap.*
        • swap high and low
      • llvm.ctpop.*
        • counts the number of bits set
      • llvm.ctlz.*
        • count the number of leading zeros
      • llvm.cttz.*
        • count the number of trailing zeros
      • llvm.sadd.with.overflow.*
      • llvm.uadd.with.overflow.*
      • llvm.ssub.with.overflow.*
      • llvm.usub.with.overflow.*
      • llvm.smul.with.overflow.*
      • llvm.umul.with.overflow.*
    • Half Precision Floating Point Intrinsics
      • llvm.convert.to.fp16
      • llvm.convert.from.fp16
    • Debugger Intrinsics
      • start with llvm.dbg. prefix
    • Exception Handling Intrinsics
      • start with llvm.eh. prefix
    • Trampoline Intrinsic
      • llvm.init.trampoline
    • Atomic Operations and Synchronization Intrinsics
      • llvm.memory.barrier
      • llvm.atomic.cmp.swap.*
      • llvm.atomic.swap.*
      • llvm.atomic.load.add.* llvm.atomic.load.sub.*
      • llvm.atomic.load.and.* llvm.atomic.load.nand.* llvm.atomic.load.or.* llvm.atomic.load.xor.*
      • llvm.atomic.load.max.* llvm.atomic.load.min.* llvm.atomic.load.umax.* llvm.atomic.load.umin.*
    • Memory Use Markers
      • llvm.lifetime.start
      • llvm.lifetime.end
      • llvm.invariant.start
      • llvm.invariant.end
    • General Intrinsics
      • llvm.var.annotation
      • llvm.annotation.*
      • llvm.trap
      • llvm.stackprotector
      • llvm.objectsize