首页 \ 问答 \ 有关为实际应用寻找良好神经网络架构的资源(Resources on finding good Neural Network architectures for real applications)

有关为实际应用寻找良好神经网络架构的资源(Resources on finding good Neural Network architectures for real applications)

我完成了两门神经网络课程,并完成了有关该主题的阅读资料。 我对Tensorflow和Keras以及构建高级神经网络(多输入,大数据,特殊图层......)感到满意。 我对底层数学也有相当深入的理解。

我的问题是我知道如何建立神经网络,但不知道“专家”会为特定应用创建一个过程。

我可以:

  • 收集大量数据并清理。
  • 训练神经网络。
  • 微调超参数。
  • 将其导出为实际应用程序。

我所缺少的是如何提出神经网络中的图层(多宽,怎样......)。 我知道这有点反复试验,并且看着什么为别人工作。 但是,必须有一个过程,人们可以用它来构建实际上工作得很好的架构。 例如现有技术的神经网络。

我正在寻找一个免费的资源,帮助我理解创建一个非常好的架构*的过程。

*通过体系结构,我的意思是组成网络及其属性的不同层


I have finished two neural network courses and done loads of reading on the subject. I am comfortable with Tensorflow and Keras and building advanced neural networks (multiple inputs, large data, special layers...). I also have a fairly deep understanding of the underlying mathematics.

My problem is that I know how to build neural networks but don't know the process by which an "expert" would create one for a specific application.

I can:

  • Collect loads of data and clean it up.
  • Train the neural network.
  • Fine tune hyper parameters.
  • Export it for actual applications.

What I am missing is how to come up with the layers in the neural network (how wide, what kind...). I know it is somewhat trial and error and looking at what has worked for others. But there must be a process that people can use to come up with architectures* that actually work very well. For example state of the art neural networks.

I am looking for a free resource that would help me understand this process of creating a very good architecture*.

*by architecture I mean the different layers that make up the network and their properties


原文:https://stackoverflow.com/questions/49784827
更新时间:2023-08-23 09:08

最满意答案

这很简单。 这是一个例子

示例HTML:

<p><a href="#" data-xpath="/bib/book[2]">2nd book</a></p>
<p><a href="#" data-xpath="/bib/book[3]/author[1]">1st author of the 3rd book</a></p>
<p><a href="#" data-xpath="/bib/book/author">All authors</a></p>
<div id="doc-content"></div>

示例CSS:

#doc-content { white-space: pre; }
.highlight { color: red; }

和JavaScript代码。 示例XML文档:

var doc = `<bib xmlns="">
  <book>
    <title>TCP/IP Illustrated</title>
    <author>Stevens</author>
    <publisher>Addison-Wesley</publisher>
  </book>
  <book>
    <title>Advanced Programming in the Unix Environment</title>
    <author>Stevens</author>
    <publisher>Addison-Wesley</publisher>
  </book>
  <book>
    <title>Data on the Web</title>
    <author>Abiteboul</author>
    <author>Buneman</author>
    <author>Suciu</author>
  </book>
</bib>`;

一些用于生成GUID的实用程序函数:

function s4() {
  return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
}
function guid() {
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
}

主函数从data-xpath属性获取XPath表达式,查找匹配表达式的节点并在匹配节点前后插入魔法注释。 然后XML文档被串行化为一个字符串。 最后,我们用<span class =“highlight”>取代神奇的评论:

var parser = new DOMParser();
var printer = new XMLSerializer();
function highlightXPath(e) {
  var xpath = e.target.dataset.xpath;
  var xml = parser.parseFromString(doc, 'text/xml');
  var nodes = xml.evaluate(xpath, xml, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  var id = guid();
  for (var i = 0; i < nodes.snapshotLength; i++) {
    var node = nodes.snapshotItem(i);
    node.parentNode.insertBefore(xml.createComment('start_' + (i+1) + '_' + id), node);
    node.parentNode.insertBefore(xml.createComment('end_' + (i+1) + '_' + id), node.nextSibling);
  }
  var str = printer.serializeToString(xml);
  var content = document.getElementById('doc-content');
  content.innerHTML = str.replace(/</g, '&lt;')
    .replace(/&lt;!--start_(\d+)_.*?-->/g, '<span id="highlight$1" class="highlight">')
    .replace(/&lt;!--end_.*?-->/g, '</span>');
}

将事件处理程序附加到链接并显示XML文档的初始未着色内容:

window.onload = function () {
  var links = document.querySelectorAll('a[data-xpath]');
  for (var i = 0; i < links.length; i++) {
    links[i].addEventListener('click', highlightXPath);
  }
  var content = document.getElementById('doc-content');
  content.innerHTML = doc.replace(/</g, '&lt;');
};

It's very simple. Here is an exmple.

Sample HTML:

<p><a href="#" data-xpath="/bib/book[2]">2nd book</a></p>
<p><a href="#" data-xpath="/bib/book[3]/author[1]">1st author of the 3rd book</a></p>
<p><a href="#" data-xpath="/bib/book/author">All authors</a></p>
<div id="doc-content"></div>

Sample CSS:

#doc-content { white-space: pre; }
.highlight { color: red; }

And the JavaScript code. Sample XML document:

var doc = `<bib xmlns="">
  <book>
    <title>TCP/IP Illustrated</title>
    <author>Stevens</author>
    <publisher>Addison-Wesley</publisher>
  </book>
  <book>
    <title>Advanced Programming in the Unix Environment</title>
    <author>Stevens</author>
    <publisher>Addison-Wesley</publisher>
  </book>
  <book>
    <title>Data on the Web</title>
    <author>Abiteboul</author>
    <author>Buneman</author>
    <author>Suciu</author>
  </book>
</bib>`;

Some utility functions to generate GUIDs:

function s4() {
  return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
}
function guid() {
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
}

Main function gets XPath expression from the data-xpath attribute, finds nodes matched by the expression and inserts magic comments before and after matching nodes. Then the XML document is serialized as a string. And at last we replace magic comments by <span class="highlight">:

var parser = new DOMParser();
var printer = new XMLSerializer();
function highlightXPath(e) {
  var xpath = e.target.dataset.xpath;
  var xml = parser.parseFromString(doc, 'text/xml');
  var nodes = xml.evaluate(xpath, xml, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  var id = guid();
  for (var i = 0; i < nodes.snapshotLength; i++) {
    var node = nodes.snapshotItem(i);
    node.parentNode.insertBefore(xml.createComment('start_' + (i+1) + '_' + id), node);
    node.parentNode.insertBefore(xml.createComment('end_' + (i+1) + '_' + id), node.nextSibling);
  }
  var str = printer.serializeToString(xml);
  var content = document.getElementById('doc-content');
  content.innerHTML = str.replace(/</g, '&lt;')
    .replace(/&lt;!--start_(\d+)_.*?-->/g, '<span id="highlight$1" class="highlight">')
    .replace(/&lt;!--end_.*?-->/g, '</span>');
}

Attach event handlers to links and display the initial unhighlighted content of the XML document:

window.onload = function () {
  var links = document.querySelectorAll('a[data-xpath]');
  for (var i = 0; i < links.length; i++) {
    links[i].addEventListener('click', highlightXPath);
  }
  var content = document.getElementById('doc-content');
  content.innerHTML = doc.replace(/</g, '&lt;');
};

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)