Tips and Tricks

算法 (Algorithms)

- to check if only one bit is set:

int n = 16; // 0001 0000
return n & (n - 1) == 0;

Java

- && 比 || 优先级高, 同时使用注意括号

return true || true && false; // true

- Scanner下使用nextInt()后需加一行nextLine()才可继续输入字符串

Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine(); //若无此行,s为上行输入数字之后的回车键
String s = sc.nextLine();
System.out.println(n);
System.out.println(s);

统计 (Statistics)

- sampling with or without replacement

即有放回与无放回的采样

- features and variables are different terms of the same thing

which is, the column.
The row is observation.

Tensorflow

- way of feeding data

There are three other methods of getting data into a TensorFlow program:

  • Feeding: Python code provides the data when running each step.
  • Reading from files: an input pipeline reads the data from files at the beginning of a TensorFlow graph.
  • Preloaded data: a constant or variable in the TensorFlow graph holds all the data (for small datasets).
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容