BeenKim/MMD-critic

NameError: name 'reg' is not defined

fangxink opened this issue · 0 comments

Running Kernel type : global
0 5
1 4
2 3
3 4
4 4
5 4
6 5
7 4
8 4
9 4
number of images being printed 120
counter 1
begin 0, end 40
counter 2
begin 40, end 80
counter 3
begin 80, end 120
counter 4
begin 120, end 120
/Users/fangxin/Downloads/MMD-critic-master/mmd.py:70: RuntimeWarning: divide by zero encountered in log
regularizer = np.log(np.abs(np.diagonal(K)[candidates] - regcolsum))
Traceback (most recent call last):
File "/Users/fangxin/Downloads/MMD-critic-master/run_digits.py", line 223, in
main(data_prefix, output_prefix, gamma, m, alltestm, kernel_type, do_output_pics)
File "/Users/fangxin/Downloads/MMD-critic-master/run_digits.py", line 179, in main
selected, critselected, digitsdat = run(
File "/Users/fangxin/Downloads/MMD-critic-master/run_digits.py", line 126, in run
plotfigs2(digitsdat.X[critselected[critsortedindx], :], critselectedy[critsortedindx], critoutfig+reg)
NameError: name 'reg' is not defined

anyone had the same situation? I wonder that how can I fix it?