As I anticipated 1, I started this series on how to use TensorFlow for solving the Advent of Code 2021 puzzles.
In this article, I show how I solved the day 3 puzzle. You’ll learn about TensorArrays, how to use them and I’ll also present a huge limitation this data type has.
Moreover, I’ll show how and why to use a tf.function experimental (but very useful) feature for avoiding useless retraces and reusing the same graph with tensors of different shapes.
I already solved days 4 and 5, hence two new articles will come soon!

  
      

      P. Galeone's blog
  

  
    

Advent of Code 2021 in pure TensorFlow - day 3 3

  A Solution to the AoC day 3 puzzle in pure TensorFlow. This challenge allows us to explore the TensorArray data type and find their limitations when used inside a static-graph context. We'll also use a tf.function experimental (but very useful)...