有关为实际应用寻找良好神经网络架构的资源(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
最满意答案
这很简单。 这是一个例子 。
示例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, '<') .replace(/<!--start_(\d+)_.*?-->/g, '<span id="highlight$1" class="highlight">') .replace(/<!--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, '<'); };
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, '<') .replace(/<!--start_(\d+)_.*?-->/g, '<span id="highlight$1" class="highlight">') .replace(/<!--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, '<'); };
相关问答
更多-
powershell xml xpath(powershell xml xpath)[2023-08-03]
我最近喜欢使用XPath。 我遇到了使用PowerShell的xml适配器的问题,这些适配器很烦人,如名称上的名称冲突: $xml = [xml]@'... -
我也有以下xPath: /List/Fields/Field 当我从XML中删除xmlns时,xPath工作正常。 当它在那里我的xPath没有发现 如果您不能注册一个命名空间绑定并且不能使用 (假设注册的前缀是“x”): /x:List/x:Fields/x:Fiels 那么还有另一种方法 : /*[name()='List']/*[name()='Fields']/*[name()='Field'] I also have the following xPath: /List/Fields/Fi ...
-
XML输出需要Xpath帮助(Xpath help needed on XML output)[2024-02-02]
XPath的简短介绍:-) 使用//DataTable您将获得XML中任何位置的任何(此处不涉及名称空间)的完整节点。 根据经验,它最好尽可能具体(而不是使用/Result/DataTables/DataTable )。 但这不是你问题的答案...... 想象一下像这样的XML: Some a contentSome b content 尝试使用XPath过滤XML(Trying to Filter XML using XPath)[2023-06-11]
XPath是一种查询语言,不能用于生成修改后的XML文档 。 专为此类转换而设计的技术称为XSLT 。 您可以使用XDocument.CreateNavigator()方法,然后使用XslCompiledTransform.Transform()方法的一个重载来执行转换。 XSLT转换本身非常简单 :为什么XML :: Schematron :: XPath不能找到XML :: XPath?(Why can't XML::Schematron::XPath find XML::XPath?)[2023-06-14]
我建议你安装XML :: XPath I suggest you install XML::XPathXML Xpath用法(XML Xpath Usage)[2022-05-13]
如果你想把这本书包含在yazar中的serach sring。 使用这样的东西: $xml = simplexml_load_file('veri/ornek.xml'); $search= "34"; $result = $xml->xpath("//book[yazar[contains(.,' $search')]]"); foreach($result as $tt){ echo $tt->isbn; } If you like to get the book containing ...XML XPath问题(XML XPath question)[2022-02-05]
我猜你想要包含Ants的member作为Name 。 这应该足够了: /categories/member[name=' Ants '] 请注意,引号包括名称所需的空格。 空格在XML中很重要,因此Ants周围的空间也是内容的一部分。 否则,您可以先对空格进行标准化,然后在比较之前先有效地修剪过多的空格。 /categories/member[normalize-space(name)='Ants'] 正如亚历杭德罗指出的那样,你可能想要在Ants元素下面的structure后代。 然后你需要进一步挖掘 ...验证事件的发送者是事件的来源。 因此,您可以通过网络搜索为节点获取XPath的代码(例如, 生成XPath表达式 )并为事件源生成XPath: doc.Validate(schemas, (sender, args) => { if (sender is XObject) { xpath = ((XObject)sender).GetXPath(); } }); Sender of validation event is a source of event. So, you can ...这是一种可能的方式: //li[normalize-space(span)="Popular Paris Categories"]//a/@href 请注意normalize-space()如何用于从span内容中删除尾随空格。 这就是为什么我最初在评论中建议的XPath不适用于您的实际HTML。 This is one possible way : //li[normalize-space(span)="Popular Paris Categories"]//a/@href Notice how no ...相关文章
更多- 【转载】Netflix: System Architectures for Personalization and Recommendation
- Real-Time Rendering 笔记 --- 1-4章
- The Log: What every software engineer should know about real-time data's unifying abstraction
- Hadoop Real-World Solutions Cookbook
- Good .net tools
- Riak, haproxy, and client side applications
- 《西安鹏程张建宁老师主讲网络安全.计算机网络基础.CISCO路由器交换机配置视频教程--网络工程师专业培训教学》(network security-->www.xapc.com.cn)5.0
- 通过100个单词掌握英语语法(二十五)good
- Twitter Storm Real-Life App 排错记
- RFC2848--The PINT Service Protocol: Extensions to SIP and SDP for IP Access to Telephone Call Services
最新问答
更多- 您如何使用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)