深色模式
Download exercise.py
实现 binary_rd(D) = 1 - h2(D),其中 h2(D)=−Dlog2D−(1−D)log2(1−D)。D=0.5 应为 0;D=0.25 应为 1−h2(0.25)。
binary_rd(D) = 1 - h2(D)
cd docs/information/rate-distortion/code python exercise.py
clone 后打开(相对仓库根目录):
docs/information/rate-distortion/code/exercise.py