TensorFlow Overview — ML Technical Interview Questions & Answers
Google's open-source deep learning framework.
TensorFlow Overview
- Simple meaning: TensorFlow is Google’s library for building and training neural nets (and more). Keras is the friendly high-level API most beginners use on top of it.
- Picture: Sequential([Dense, Dense]) → compile(loss, optimizer) → fit. Tensors = multidimensional arrays the GPU likes.
- Use it when you need deep learning (images, large nets). For a 5-column CSV, sklearn is simpler.
- Trap: writing TensorFlow for linear regression homework. Trap: mixing tf.keras and random sklearn scaling with no pipeline story.
Technical Interview Tip: TensorFlow/Keras for nets. sklearn for classical tables.
Code Examples for TensorFlow Overview
TensorFlow Overview — working example
# PCA-style intuition: project 2D → 1D by a direction vector
points = [(1.0, 1.0), (2.0, 2.0), (3.0, 2.8)]
# unit direction along y = x
ux, uy = 0.7071, 0.7071
proj = [x * ux + y * uy for x, y in points]
print([round(v, 3) for v in proj])
# Tiny ensemble: average two model votes
votes = [1, 0, 1]
v2 = [1, 1, 1]
ens = [1 if a + b >= 2 else 0 for a, b in zip(v1, v2)]
print(ens)TensorFlow Overview — dim reduction compresses features; ensembles combine models; deep nets/RL/NLP are specialized families — practice the core math idea first.
How to Explain TensorFlow Overview to an Interviewer
Keras vs TensorFlow?
Keras is the high-level API on TF
When sklearn instead?
Classical ML on tables