janus926 my blog

Running on a deep learning platform?

What if it’s a deep learning OS or VM, which optimize programs and user experience automitically? Seems quite interesting. I should study neural network, now!

Some to start:

  • Hacker’s guide to Neural Networks
    • Forward & backward pass
      Imagine neuron is a function, which can be represted as gates with input and a single output. With inputs you can move forward along the gates to get output, and you can calculate gradients of each input to higher the ouput with +1 by moving backward (backpropogate).
    • Training
      Have a dataset to run the function (forward) and tune its parameters (backward) so it outputs high scores for positive examples and low scores for negative examples.

    So far, my understanding after reading this is it’s pattern recogniztion by updating your function with the training data. It’s more like to determine what’s in front of you, an image or a speech. Probably this is enough for computuer to learn different things… but intelligent?

  • Deep Learning vs Machine Learning vs Pattern Recognition
  • Deep Learning, NLP, and Representations
  • How Computers Learn
  • Is deep learning SoC game-changer?

Bug 1110624 - How does an iframe start on B2G

On B2G, an app is just an embedded iframe like this: <iframe src=... remote mozbrowser mozapp=...>. It is mysterious to me how does that HTML tag become a process and load the content. Because of bug 1110624, I had a chance to look into the sequence, and figured out how is that happened. Some classes are involved to load the things according to the special attributes. I drew a simplified classes diagram:

classes

I don’t know how to express the sequence simply, so this’s like a stack and the indent (1 space) indicates the stack level.

iframe.src = ...
 HTMLIFrameElement::SetAttr()
  nsElementFrameLoaderOwner::LoadSrc()
   nsElementFrameLoaderOwner::EnsureFrameLoader()
    mFrameLoader = nsFrameLoader::Create()
   nsFrameLoader::LoadFrame()
    nsFrameLoader::LoadURI()
     nsDocument::InitializeFrameLoader()
      nsDocument::MaybeInitializeFinalizeFrameLoaders()
       nsFrameLoader::ReallyStartLoading()
        nsFrameLoader::ReallyStartLoadingInternal()
         if (mRemoteFrame) {
          mRemoteBrowser = ContentParent::CreateBrowserOrApp()
           if (isBrowser) {
            ContentParent::GetNewOrUsedBrowserProcess()
           } else {
            ContentParent::GetNewOrPreallocatedAppProcess()
           }
           ContentParent::AllocateTabId()
           new TabParent()
           ContentParent::SendPBrowserConstructor()
           --- IPC ---
           ContentChild::AllocPBrowserChild()
            nsIContentChild::AllocPBrowserChild()
             TabChild::Create()
              if (sPreallocatedTab) {
               sPreallocatedTab->SetTabId()
               sPreallocatedTab->SetTabContext()
              } else {
               new TabChild()
              }
           ContentChild::RecvPBrowserConstructor()
          nsFrameLoader::ShowRemoteFrame()
           TabParent::Show()
            PBrowserParent::SendShow()
            --- IPC ---
            TabChild::RecvShow()
             TabChild::InitTabChildGlobal()
              TabChild::RecvLoadRemoteScript("BrowserElementChild.js")
           NotifyObservers("remote-browser-shown")
            nsBrowserElement::InitBrowserElementAPI()
             mBrowserElementAPI = do_CreateInstance("BrowserElementParent.js")
             mBrowserElementAPI->SetFrameLoader()
          mRemoteBrowser->LoadURL()
           TabParent::LoadURL()
            PBrowserParent::SendLoadURL()
            --- IPC ---
            TabChild::RecvLoadURL()
             nsIWebNavigation::LoadURI()
              nsDocShell::LoadURI()
         } else { // !mRemoteFrame
          nsDocShell::LoadURI()
         }

Moving from Blogger

I am too lazy to import the posts from Blogger, just let the history stays there.

So I simply forked poole/lanyon to build this site, it’s easy for me, but I don’t know is it easy for non-programmer to handle those git things. Anyway, this is going to change my flow of writing things. Hopefully it’s a positive move.