You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I ran multiple_minima.py, an error occurred:ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 3) + inhomogeneous part.
Calculating PCA directions...
Normalizing...
Calculating coefficients...
Calculating Z-values of paths...
100%|██████████| 3/3 [00:05<00:00, 1.67s/it]
0%| | 0/30 [00:00<?, ?it/s]Calculating loss landscape...
100%|██████████| 30/30 [24:46<00:00, 49.55s/it]
Traceback (most recent call last):
File "E:\pycharm\PyCharm Community Edition 2022.3.3\plugins\python-ce\helpers\pydev\pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "E:\pycharm\PyCharm Community Edition 2022.3.3\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:\GradVis-master\Examples\multiple_minima.py", line 202, in
vis.visualize(nnmodel, filesname, 30, "three_minima_example", v_vec=v_dir.cpu().numpy(), w_vec=w_dir.cpu().numpy(), proz=.4, verbose=True)
File "E:\GradVis-master\Examples../toolbox\Visualization.py", line 374, in visualize
np.savez_compressed(path_to_file, a=outputs, b=flag)
File "F:\Anaconda\envs\sd-torch\lib\site-packages\numpy\lib\npyio.py", line 710, in savez_compressed
_savez(file, args, kwds, True)
File "F:\Anaconda\envs\sd-torch\lib\site-packages\numpy\lib\npyio.py", line 740, in _savez
val = np.asanyarray(val)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 3) + inhomogeneous part.
python-BaseException
How can I resolve it?
The text was updated successfully, but these errors were encountered:
When I ran
multiple_minima.py
, an error occurred:ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 3) + inhomogeneous part.
Calculating PCA directions...
Normalizing...
Calculating coefficients...
Calculating Z-values of paths...
100%|██████████| 3/3 [00:05<00:00, 1.67s/it]
0%| | 0/30 [00:00<?, ?it/s]Calculating loss landscape...
100%|██████████| 30/30 [24:46<00:00, 49.55s/it]
Traceback (most recent call last):
File "E:\pycharm\PyCharm Community Edition 2022.3.3\plugins\python-ce\helpers\pydev\pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "E:\pycharm\PyCharm Community Edition 2022.3.3\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:\GradVis-master\Examples\multiple_minima.py", line 202, in
vis.visualize(nnmodel, filesname, 30, "three_minima_example", v_vec=v_dir.cpu().numpy(), w_vec=w_dir.cpu().numpy(), proz=.4, verbose=True)
File "E:\GradVis-master\Examples../toolbox\Visualization.py", line 374, in visualize
np.savez_compressed(path_to_file, a=outputs, b=flag)
File "F:\Anaconda\envs\sd-torch\lib\site-packages\numpy\lib\npyio.py", line 710, in savez_compressed
_savez(file, args, kwds, True)
File "F:\Anaconda\envs\sd-torch\lib\site-packages\numpy\lib\npyio.py", line 740, in _savez
val = np.asanyarray(val)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (2, 3) + inhomogeneous part.
python-BaseException
How can I resolve it?
The text was updated successfully, but these errors were encountered: