First, build a docker image to reproduce the core LAME algorithm.
docker build -t lame-reproduce -f docker/Dockerfile .Run built docker image to exec.
docker run -d --rm --name lame-reproduce lame-reproduceExec bash to running container.
docker exec -it lame-reproduce /bin/bashRun reproduce.py code.
python reproduce.pyCompare the result:
- Original
Converged in 14 iterations
tensor([[0.0239, 0.1306, 0.0620, 0.2954, 0.0102, 0.2785, 0.1276, 0.0174, 0.0230,
0.0315],
[0.0203, 0.0863, 0.0017, 0.0192, 0.0016, 0.7971, 0.0260, 0.0068, 0.0022,
0.0388],
[0.0250, 0.0079, 0.0439, 0.0156, 0.4774, 0.0189, 0.0041, 0.3593, 0.0374,
0.0104],
[0.0130, 0.0518, 0.0154, 0.0428, 0.0011, 0.0079, 0.0104, 0.0186, 0.0614,
0.7776]])- Reproduce in python 3.11
Converged in 11 iterations
tensor([[0.0239, 0.1306, 0.0620, 0.2954, 0.0102, 0.2785, 0.1276, 0.0174, 0.0230,
0.0315],
[0.0203, 0.0863, 0.0017, 0.0192, 0.0016, 0.7971, 0.0260, 0.0068, 0.0022,
0.0388],
[0.0250, 0.0079, 0.0439, 0.0156, 0.4774, 0.0189, 0.0041, 0.3593, 0.0374,
0.0104],
[0.0130, 0.0518, 0.0154, 0.0428, 0.0011, 0.0079, 0.0104, 0.0186, 0.0614,
0.7776]])