原因在于没有使用torch.no_grad()函数。在查看验证集和测试集表现时,应使用类似这样的代码 ...
分类:
其他好文 时间:
2018-12-02 13:34:27
阅读次数:
591
lua中的逻辑运算符,认为只有false、nil为假,其他的都为真(包括0、空串) a and b -- 如果a为false,则返回a,否则返回b a or b -- 如果a为true,则返回a,否则返回b 一个很实用的技巧:如果x为false或者nil则给x赋初始值v 等价于 C语言中的三元运算符 ...
分类:
其他好文 时间:
2018-12-02 00:32:59
阅读次数:
168
使用Nginx+Lua实现waf 技术内容来自:https://github.com/loveshell/ngx_lua_waf 软件包需求: 1 .Nginx兼容性【最后测试到1.13.6】 2 .PCRE为Nginx编译安装关系的依赖 3 .下载luajit解释器和ngx_devel_kit以及 ...
分类:
其他好文 时间:
2018-11-29 20:03:04
阅读次数:
201
一、单机安装 1、下载地址 https://www.apache.org/dyn/closer.lua/hbase/1.4.8/hbase-1.4.8-bin.tar.gz 2、解压缩 tar -zxvf hbase-1.4.8-bin.tar.gz 3、环境变量 4、配置 5、启动 6、验证 ...
分类:
其他好文 时间:
2018-11-29 01:22:47
阅读次数:
229
>>> import bisect >>> scores = [(100, 'perl'), (200, 'tcl'), (400, 'lua'), (500, 'python')] >>> bisect.insort(scores, (300, 'ruby')) >>> scores [(100,... ...
分类:
编程语言 时间:
2018-11-27 21:12:25
阅读次数:
879
凯奥斯 :https://blog.csdn.net/ecidevilin/article/category/6454847 ...
分类:
其他好文 时间:
2018-11-25 20:00:42
阅读次数:
168
原文:https://blog.csdn.net/zzulp/article/details/76358694 import keras from keras.datasets import cifar10 from keras.models import Sequential from keras ...
分类:
其他好文 时间:
2018-11-25 14:37:29
阅读次数:
424
Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the d ...
分类:
其他好文 时间:
2018-11-25 13:17:15
阅读次数:
346
转自:http://www.runoob.com/lua/lua-metatables.html 感性认识: “Lua中Metatable这个概念, 国内将他翻译为元表. 元表为重定义Lua中任意一个对象(值)的默认行为提供了一种公开入口. 如同许多OO语言的操作符重载或方法重载. Metatabl ...
分类:
Web程序 时间:
2018-11-24 14:45:10
阅读次数:
232