-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iteration 1: codebook contains NaN or Inf values #176
Comments
The weight matrix is nan every time |
this the code 生成示例数据并确保数据类型为float32data = np.random.rand(10000, 3).astype(np.float32) 数据标准化scaler = StandardScaler() 再次检查数据是否包含 NaN 或 Infif np.any(np.isnan(data)) or np.any(np.isinf(data)): 设置SOM网格大小n_rows, n_columns = 20, 20 初始化Somoclu对象som = Somoclu(n_columns, n_rows) 记录初始BMUinitial_bmus = som.get_bmus(data) 记录每次迭代后的BMUiterations = 10 训练SOM并记录BMU变化for epoch in range(iterations):
检查每次迭代后的BMU变化for i, bmus in enumerate(bmus_history): |
什么版本的python和环境 |
python3.9 |
但是我调用MiniSom写时,权值和分类类别值会更新,Somoclu就更新不了 |
pip安装的还是anaconda里装的 |
anaconda里装的
…------------------ 原始邮件 ------------------
发件人: "peterwittek/somoclu" ***@***.***>;
发送时间: 2024年7月30日(星期二) 中午12:39
***@***.***>;
***@***.******@***.***>;
主题: Re: [peterwittek/somoclu] Iteration 1: codebook contains NaN or Inf values (Issue #176)
pip安装的还是anaconda里装的
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
什么系统 什么版本的somoclu |
win10\1.7.6 |
但epoch>1的时候都正常? 感觉一般没遇到过用epoch=1的? |
不正常,基本不变
…------------------ 原始邮件 ------------------
发件人: "peterwittek/somoclu" ***@***.***>;
发送时间: 2024年8月3日(星期六) 中午11:45
***@***.***>;
***@***.******@***.***>;
主题: Re: [peterwittek/somoclu] Iteration 1: codebook contains NaN or Inf values (Issue #176)
但epoch>1的时候都正常? 感觉一般没遇到过用epoch=1的?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
一般用法不是epoch>1然后运行完再看?没见过epoch=1然后外面循环的 |
有个初始的结果
…------------------ 原始邮件 ------------------
发件人: "peterwittek/somoclu" ***@***.***>;
发送时间: 2024年8月3日(星期六) 中午11:51
***@***.***>;
***@***.******@***.***>;
主题: Re: [peterwittek/somoclu] Iteration 1: codebook contains NaN or Inf values (Issue #176)
一般用法不是epoch>1然后运行完再看?没见过epoch=1然后外面循环的
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The result after each iteration of som is the same, no change
The text was updated successfully, but these errors were encountered: