Tips and Tricks

2017-08-29  本文已影响0人  Lobotomy

算法 (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).
上一篇下一篇

猜你喜欢

热点阅读