同事今天在用mybatis查询时候,报了上面这个问题。上网查了下,原来是mybatis封装类型的问题。原因是在resultMap中jdbcType写为了Integer,但是在MyBatis中没有这个数据类型 来查看了原码,发现MyBatis的jdbcType是一个枚举类,有以下类型: public ...
分类:
数据库 时间:
2020-02-13 23:12:46
阅读次数:
99
线性回归 主要内容包括: 线性回归的基本要素 线性回归模型从零开始的实现 线性回归模型使用pytorch的简洁实现 线性回归的基本要素 模型 为了简单起见,这里我们假设价格只取决于房屋状况的两个因素,即面积(平方米)和房龄(年)。接下来我们希望探索价格与这两个因素的具体关系。线性回归假设输出与各个输 ...
分类:
其他好文 时间:
2020-02-13 17:32:55
阅读次数:
73
import tensorflow as tf x=tf.Variable([1,2]) a=tf.constant([3,3]) sub=tf.subtract(x,a) #增加一个减法op add=tf.add(x,sub) #增加一个加法op #注意变量再使用之前要再sess中做初始化,但是下 ...
分类:
其他好文 时间:
2020-02-13 10:10:41
阅读次数:
50
报错: UnboundLocalError: local variable 'total_page' referenced before assignment news_list = [] # 修改 total_page =1 current_page = 1 try: paginate = use ...
分类:
编程语言 时间:
2020-02-13 09:39:40
阅读次数:
86
import tensorflow as tf #Fetch概念 在session中同时运行多个op input1=tf.constant(3.0) #constant()是常量不用进行init初始化 input2=tf.constant(2.0) input3=tf.constant(5.0) a ...
分类:
其他好文 时间:
2020-02-13 09:33:57
阅读次数:
39
断言(Assertion)是一种调试程序的方式。在Java中,使用assert关键字来实现断言。 语句assert x >= 0;即为断言,断言条件x >= 0预期为true。如果计算结果为false,则断言失败,抛出AssertionError。 使用assert语句时,还可以添加一个可选的断言消 ...
分类:
其他好文 时间:
2020-02-11 14:32:50
阅读次数:
66
1 def tensor_demo(): 2 """ 3 张量的演示 4 :return: 5 """ 6 tensor1 = tf.constant(4.0) 7 tensor2 = tf.constant([1, 2, 3, 4]) 8 linear_squares = tf.constant( ...
分类:
其他好文 时间:
2020-02-10 22:13:32
阅读次数:
58
A method or operator returns NaN when the result of an operation is undefined. For example, the result of dividing zero by zero is NaN, as the followi ...
定义常量 import tensorflow as tf # 定义常量 m1 = tf.constant([[3, 3]]) m2 = tf.constant([[2], [3]]) # 定义乘法 product = tf.matmul(m1, m2) # 这里不会直接输出结果,会打印出一个tens ...
分类:
其他好文 时间:
2020-02-08 17:26:41
阅读次数:
59
Constant Pool常量池的概念: 在讲到String的一些特殊情况时,总会提到String Pool或者Constant Pool,但是我想很多人都不太明白Constant Pool到底是个怎么样的东西,运行的时候存储在哪里,所以在这里先说一下Constant Pool的内容.String ...
分类:
其他好文 时间:
2020-02-06 12:41:58
阅读次数:
48