斯坦福大学TensorFlow课程笔记(cs20si):#2

使用TensorBoard

import tensorflow as tf

a=tf.constant(2)
b=tf.constant(3)

x=tf.add(a,b)

with tf.Session() as sess:
    writer = tf.summary.FileWriter('./graphs',sess.graph)
    print(sess.run(x))
    
writer.close()
5

(以Anaconda3为例)创建python文件并保存在桌面

python TFtest.py
打开Anaconda Prompt并来到桌面路径下运行PYTHON脚本
tensorboard --logdir="./graphs" --port 6006
运行tensorboad, 它会访问之前脚本创建的graphs文件夹。之后在控制台会显示访问路径。例如 http://WIN10-711010523:6006 将地址粘到浏览器可以看到graph

[图片上传失败...(image-21c182-1513071247284)]

接下来将输入节点的名称做一下修改

import tensorflow as tf

a=tf.constant(2,name="a")#用name修改节点名称
b=tf.constant(3,name="b")

x=tf.add(a,b,name="add")


with tf.Session() as sess:
    writer = tf.summary.FileWriter('./graphs',sess.graph)
    print(sess.run(x))
5

还像之前一样在终端分别运行PYTHON脚本与tensorboard。如果之前浏览器还开着之前tensorboard页面,需要先关闭再重新开启,不然终端会有这样的提示
Found more than one graph event per run, or there was a metagraph containing a graph_def, as well as one or more graph events. Overwriting the graph with the newest event.

Constant 类型

import tensorflow as tf
a=tf.constant([2,2],name='a')#创建constant
b=tf.constant([[0,1],[2,3]],name="b")
add=tf.add(a,b,name="add")
mul=tf.multiply(a,b,name="mul")
with tf.Session() as sess:
    x,y=sess.run([add,mul])
    print(x,y)
[[2 3]
 [4 5]] [[0 2]
 [4 6]]

创建constant类型的例子

特殊赋值

zeros=tf.zeros([2,3],tf.int32)
with tf.Session() as sess:
    result=sess.run(zeros)
    print(result)
[[0 0 0]
 [0 0 0]]

创建指定大小的zeros矩阵

input_tensor=tf.constant([[0,1],[2,3],[4,5]],name="input_tensor")
zeros=tf.zeros_like(input_tensor)#指定zeros矩阵的大小
with tf.Session() as sess:
    result=sess.run(zeros)
    print(result)
[[0 0]
 [0 0]
 [0 0]]
根据传入的矩阵尺寸创建zeros矩阵

其它类似的函数:

** ones **

  • tf.ones(shape,dtype=tf.float32,name=None)
  • tf.ones_like(input_tensor,dtype=None,name=None,optimize=True)
matrix=tf.fill([2,3],8)

with tf.Session() as sess:
    result=sess.run(matrix)
    print(result)
[[8 8 8]
 [8 8 8]]

在矩阵内添加指定数值
TF数据类型可以和numpy连用

import numpy as np
tf.int32==np.int32
True
matrix=tf.ones([2,2],np.float32)

with tf.Session() as sess:
    result=sess.run(matrix)
    print(result)
[[ 1.  1.]
 [ 1.  1.]]

tf.Session.run(fetches)
tf数据输出为numpy array

my_const=tf.constant([1.0,2.0],name="my_const")
with tf.Session() as sess:b
    print(sess.graph.as_graph_def())
node {
  name: "Const"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 2
      }
    }
  }
}
node {
  name: "Const_1"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 3
      }
    }
  }
}
node {
  name: "Add"
  op: "Add"
  input: "Const"
  input: "Const_1"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "a"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 2
      }
    }
  }
}
node {
  name: "b"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 3
      }
    }
  }
}
node {
  name: "add"
  op: "Add"
  input: "a"
  input: "b"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "a_1"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
        }
        tensor_content: "\002\000\000\000\002\000\000\000"
      }
    }
  }
}
node {
  name: "b_1"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000"
      }
    }
  }
}
node {
  name: "add_1"
  op: "Add"
  input: "a_1"
  input: "b_1"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "a_2"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
        }
        tensor_content: "\002\000\000\000\002\000\000\000"
      }
    }
  }
}
node {
  name: "b_2"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000"
      }
    }
  }
}
node {
  name: "add_2"
  op: "Add"
  input: "a_2"
  input: "b_2"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "mul"
  op: "Mul"
  input: "a_2"
  input: "b_2"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "a_3"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
        }
        tensor_content: "\002\000\000\000\002\000\000\000"
      }
    }
  }
}
node {
  name: "b_3"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000"
      }
    }
  }
}
node {
  name: "add_3"
  op: "Add"
  input: "a_3"
  input: "b_3"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "mul_1"
  op: "Mul"
  input: "a_3"
  input: "b_3"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "a_4"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
        }
        tensor_content: "\002\000\000\000\002\000\000\000"
      }
    }
  }
}
node {
  name: "b_4"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000"
      }
    }
  }
}
node {
  name: "add_4"
  op: "Add"
  input: "a_4"
  input: "b_4"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "mul_2"
  op: "Mul"
  input: "a_4"
  input: "b_4"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "zeros"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_FLOAT
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_FLOAT
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 3
          }
        }
        float_val: 0.0
      }
    }
  }
}
node {
  name: "zeros_1"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_FLOAT
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_FLOAT
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 3
          }
        }
        float_val: 0.0
      }
    }
  }
}
node {
  name: "zeros_2"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 3
          }
        }
        int_val: 0
      }
    }
  }
}
node {
  name: "input_tensor"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000\004\000\000\000\005\000\000\000"
      }
    }
  }
}
node {
  name: "zeros_like"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        int_val: 0
      }
    }
  }
}
node {
  name: "input_tensor_1"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000\004\000\000\000\005\000\000\000"
      }
    }
  }
}
node {
  name: "zeros_like_1"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        int_val: 0
      }
    }
  }
}
node {
  name: "input_tensor_2"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000\004\000\000\000\005\000\000\000"
      }
    }
  }
}
node {
  name: "zeros_like_2"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        int_val: 0
      }
    }
  }
}
node {
  name: "input_tensor_3"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000\004\000\000\000\005\000\000\000"
      }
    }
  }
}
node {
  name: "zeros_like_3"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 3
          }
          dim {
            size: 2
          }
        }
        int_val: 0
      }
    }
  }
}
node {
  name: "Fill_1/dims"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
          dim {
            size: 2
          }
        }
        tensor_content: "\002\000\000\000\003\000\000\000"
      }
    }
  }
}
node {
  name: "Fill_1/value"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_INT32
        tensor_shape {
        }
        int_val: 8
      }
    }
  }
}
node {
  name: "Fill_1"
  op: "Fill"
  input: "Fill_1/dims"
  input: "Fill_1/value"
  attr {
    key: "T"
    value {
      type: DT_INT32
    }
  }
}
node {
  name: "ones"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_FLOAT
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_FLOAT
        tensor_shape {
          dim {
            size: 2
          }
          dim {
            size: 2
          }
        }
        float_val: 1.0
      }
    }
  }
}
node {
  name: "my_const"
  op: "Const"
  attr {
    key: "dtype"
    value {
      type: DT_FLOAT
    }
  }
  attr {
    key: "value"
    value {
      tensor {
        dtype: DT_FLOAT
        tensor_shape {
          dim {
            size: 2
          }
        }
        tensor_content: "\000\000\200?\000\000\000@"
      }
    }
  }
}
versions {
  producer: 24
}

打印graph def

Variables

Variable 是一个类,constant 是一种op

初始化variable

init=tf.global_variables_initializer()
with tf.Session() as sess:
    sess.run(init)

初始化全部variables

init_ab=tf.variables_initializer([a,b],name="init_ab")
with tf.Session() as sess:
    sess.run(init_ab)b
---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

<ipython-input-31-a05695c617e6> in <module>()
      1 
----> 2 with tf.Session(init_ab=tf.variables_initializer([a,b],name="init_ab")) as sess:
      3     sess.run(init_ab)


~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variables.py in variables_initializer(var_list, name)
   1378   """
   1379   if var_list and context.in_graph_mode():
-> 1380     return control_flow_ops.group(*[v.initializer for v in var_list], name=name)
   1381   return control_flow_ops.no_op(name=name)
   1382 


~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\ops\variables.py in <listcomp>(.0)
   1378   """
   1379   if var_list and context.in_graph_mode():
-> 1380     return control_flow_ops.group(*[v.initializer for v in var_list], name=name)
   1381   return control_flow_ops.no_op(name=name)
   1382 


AttributeError: 'Tensor' object has no attribute 'initializer'

初始化部分variables但是报错

W=tf.Variable(tf.zeros([784,10]))
with tf.Session() as sess:
    sess.run(W.initializer)

初始化单独一个variable

#初始化大小700X100的随机数值矩阵
W=tf.Variable(tf.truncated_normal([700,10]))
with tf.Session() as sess:
    sess.run(W.initializer)
    print(W)
    print(W.eval())
<tf.Variable 'Variable_2:0' shape=(700, 10) dtype=float32_ref>
[[-1.64373493  1.38142228  0.02620468 ...,  0.03384978 -1.18727875
  -0.30884752]
 [ 1.10493028 -0.39550069 -0.03230183 ...,  0.4909828   0.55792344
  -1.59890783]
 [-0.44164404  0.69113725 -0.86431575 ...,  0.27377507 -1.64605892
   0.84873748]
 ..., 
 [-1.36063004  0.99020559  0.57447302 ..., -0.20169938 -0.09743395
  -1.45789444]
 [ 0.30184504 -0.51223069 -1.18259192 ..., -0.5938319   1.26349866
   0.19031805]
 [ 0.96660119  0.90686685 -1.39591968 ...,  0.13805443  0.88506061
   1.22530198]]

Variable的赋值方法

W=tf.Variable(10)
W.assign(100)
with tf.Session() as sess:
    sess.run(W.initializer)
    print(W.eval())
10

W.assign(100)并没有真正赋值给W,只是做了一下运算。此处需要放在session里才能赋值

W=tf.Variable(10)
assign_op=W.assign(100)
with tf.Session() as sess:
    sess.run(W.initializer)
    sess.run(assign_op)
    print(W.eval())
100

在session加入运算后赋值成功。赋值不用初始化variable因为assign_op一直执行了这一动作。数值初始化本身就是赋值的一类,只不过是专门赋值初始数值的op

#其它赋值方式
my_var=tf.Variable(2,name="my_var")
my_var_times_two=my_var.assign(2*my_var)
with tf.Session() as sess:
    sess.run(my_var.initializer)
    sess.run(my_var_times_two)#>>4
    sess.run(my_var_times_two)#>>8
     sess.run(my_var_times_two)#>>16
#其它赋值方式
my_var=tf.Variable(10)
With tf.Session() as sess:
    sess.run(my_var.initializer)
    sess.run(my_var.assign_add(10))#>>20
    sess.run(my_var.assign_sub(2))#>>18

assign_add()与assign_sub()不能初始化variable,只能用my_var的数值

#每个session包含各自的variable
W=tf.Variable(10)

sess1=tf.Session()
sess2=tf.Session()

sess1.run(W.initializer)
sess2.run(W.initializer)

print(sess1.run(W.assign_add(10)))
print(sess2.run(W.assign_sub(2)))

20
8
#每个session包含各自的variable
W=tf.Variable(10)

sess1=tf.Session()
sess2=tf.Session()

sess1.run(W.initializer)
sess2.run(W.initializer)

print(sess1.run(W.assign_add(10)))
print(sess2.run(W.assign_sub(2)))

print(sess1.run(W.assign_add(100)))
print(sess2.run(W.assign_sub(50)))

sess1.close()
sess2.close()
20
8
120
-42
#用一个Variable初始化另一个Variable

#W是个700X100的随机矩阵
W=tf.Variable(tf.truncated_normal([700,10]))
U=tf.Variable(2*W)

Session 与 InteractiveSession

sess = tf.InteractiveSession()
a=tf.constant(5.0)
b=tf.constant(6.0)
c=a*b

print(c.eval()) #在InteractiveSession下,无需像之前那样指定session
sess.close()
30.0

声明tf.InteractiveSession()后无需再次指定session,可以直接运算

Control Dependency

用来指定运算顺序
with g.control_dependencies([a,b,c]):
d= ...
e= ...
#运行顺序仍然是a,b,c

Placeholder 占位

如同公式f(x,y)=x*2+y一样,我们无需知道x,y的确切数值就可以编辑公式

#创建一个placeholder
a=tf.placeholder(tf.float32,shape=[3]) #建议一开始设置好数据类型

b=tf.constant([5,5,5],tf.float32)

c=a+b

with tf.Session() as sess:
    print(sess.run(c,{a:[1,2,3]}))  #向placeholder传入dict 赋值
                                    #每回只能做一次赋值
[ 6.  7.  8.]

更改op的数值

a=tf.add(2,5)
b=tf.multiply(a,3)

with tf.Session() as sess:
    #将a的数值替换为15
    replace_dict={a:15}
    sess.run(b,feed_dict=replace_dict)#将replace_dict的数值传给feed_dict
    

Lazy Loading

直到需要时再初始化对象

#普通loading,需要把所有op全部写出来
x=tf.Variable(10,name='x')
y=tf.Variable(20,name='y')
z=tf.add(x,y)

with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    for _ in range(10):
        sess.run(z)
#lazy loading
x=tf.Variable(10,name='x')
y=tf.Variable(20,name='y')

with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    for _ in range(10):
        sess.run(tf.add(x,y))  #把最后一步运算放到这里

运行千次OP时的建议

  • 将op定义与计算/运行分开
  • 使用python property 编写function
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 206,723评论 6 481
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 88,485评论 2 382
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 152,998评论 0 344
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 55,323评论 1 279
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 64,355评论 5 374
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,079评论 1 285
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,389评论 3 400
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,019评论 0 259
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 43,519评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,971评论 2 325
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,100评论 1 333
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,738评论 4 324
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,293评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,289评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,517评论 1 262
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,547评论 2 354
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,834评论 2 345

推荐阅读更多精彩内容

  • 简单线性回归 import tensorflow as tf import numpy # 创造数据 x_dat...
    CAICAI0阅读 3,541评论 0 49
  • 我是80后,根儿在遥远的农村,这个遥远只限路程,因为它一直驻扎在心房里,随时想起都是暖暖的温暖! ...
    粉黛青衣阅读 1,113评论 5 2
  • 我有时候有种莫名的后知后觉,直觉在前面,逻辑在后面。
    rosalinna阅读 77评论 0 0
  • 经常一个人,沏一壶普洱茶,放几首经典的老歌,望着我那一盆盆绿色植物,一坐就是大半天 。有人告诉我:这就是精神内核...
    醚路阅读 450评论 4 2
  • 晴朗的周末,阳光明媚的不像话,受友人之约,逛街,吃东西,聊心事。 女孩子,如果还可以自称为女孩子,都喜欢一起逛街一...
    折草阅读 194评论 0 0