enumerate
-
[tensorflow 2.0] tf.data.Dataset enumerate데이터분석 2019. 12. 1. 17:55
tf.data.Dataset API를 보면 enumerate() 함수가 있다. 배치마다의 값 확인을 위해서 아래 함수를 쓰면 되겠구나! 했는데.. # NOTE: The following examples use `{ ... }` to represent the # contents of a dataset. a = { 1, 2, 3 } b = { (7, 8), (9, 10) } # The nested structure of the `datasets` argument determines the # structure of elements in the resulting dataset. a.enumerate(start=5)) == { (5, 1), (6, 2), (7, 3) } b.enumerate() == { (0,..