artemyk/ibsgd

Number of repeats problem.

Closed this issue · 4 comments

Hello, thanks for sharing the code. Really appreciate it!
May I know how to repeat it 50 times to get the average value for I(X; T) and I(T; Y)?

Moreover, have you met with the number of repeat problem when you replicated Shwartz-Ziv & Tishby's result using their code? Specifically, after setting num_repeat=50 in their code, I got a error like this.

IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

in file plot_figures.py, line
results = [[data[j,k][name] for k in range(data.shape[1])] for j in range(data.shape[0])]

@happinesszl Sorry, we cannot assist with Shwartz-Ziv & Tishby's code.

I see. Thanks for the reply. May I know how to repeat it 50 times to get the average value for I(X; T) and I(T; Y) in your implementation?

@happinesszl Try running MNIST_SaveActivations.ipynb multiple times with different SAVE_DIR specified. Then modify the code in MNIST_ComputeMI.ipynb to load data from those different directories and compute means, standard errors, or whatever you'd like.

Oh, I see. Thanks very much! Really appreciate it.