1. tf.constant(list/array) , tf.convert_to_tensor(list/array) 

2. tf.ones(shape) tf.zeros(shape) tf.fill(shape,value)

3.tf.ones_like(tensor) tf.zeros_like(tensor)

#正态分布
4. tf.random.normal(shape,mean,stddev,dtype) 

# 均匀分布
5. tf.random.uniform(shape,minval,maxval,dtype)

6. tf.range(start = 0, limit , delta = 1)

  

相关文章:

  • 2021-08-24
  • 2021-12-02
  • 2021-10-15
  • 2021-12-23
  • 2021-07-13
  • 2021-06-27
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-04-22
相关资源
相似解决方案