摘要: /* * 数组:存储同一种数据类型的多个元素的容器 * 定义格式: * A:数据类型[]数组名;(推荐的方式) * B:数据类型 数组名[] * 举例: * int[] arr; * int arr[]; *数组初始化; * A:所谓的数组初始化,就是为数组开辟内存空间,并为数组中的每个元素赋予初始值 * B:我们有两种方式可以实现数组的初始化 * a:动态初始化 ... 阅读全文
posted @ 2019-07-02 22:48 薄眠抛却陈年事。 阅读(145) 评论(0) 推荐(0) 编辑
摘要: public class RandomDemo { /* * Random:用于产生随机数 * 使用步骤: * 导包 * import java.util.Random * 创建对象 * Random r = new Random() * 获取数据 * int number=r.nextInt(10) * 获取数据的范围:[0,10) */ pub... 阅读全文
posted @ 2019-07-02 21:59 薄眠抛却陈年事。 阅读(159) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf #张量的计算图,神经网络的计算过程,只搭建,不运算。 a=tf.constant([1.0,2.0]) b=tf.constant([3.0,4.0]) result=a+b print(result) c=tf.constant([[1.0,2.0]]) d=tf.constant([[3.0],[4.0]]) y=tf.matmul(c,d... 阅读全文
posted @ 2019-07-02 16:10 薄眠抛却陈年事。 阅读(194) 评论(0) 推荐(0) 编辑