ysaito8015 / nx_linear_regression

Update NxLinearRegression script from article on DOCKYARD
0 stars 0 forks source link

NxLinearRegression.FuelEconomy.train(train) でエラー #1

Open ysaito8015 opened 1 month ago

ysaito8015 commented 1 month ago
 93 iex(3)> params = NxLinearRegression.FuelEconomy.train(train)↲                                                                     
 94 ** (FunctionClauseError) no function clause matching in Nx.Type.type_to_int/1----↲                                                       
 95 ----↲                                                                                                                                    
 96     The following arguments were given to Nx.Type.type_to_int/1:↲                                                                        
 97 ----↲                                                                                                                                    
 98         # 1↲                                                                                                                             
 99         #Nx.Tensor<↲                                                                                                                     
100           f32↲                                                                                                                           
101 ----------↲                                                                                                                              
102           Nx.Defn.Expr↲                                                                                                                  
103           parameter a:0   f32↲                                                                                                           
104         >↲                                                                                                                               
105 ----↲                                                                                                                                    
106     Attempted function clauses (showing 5 out of 5):↲                                                                                    
107 ----↲                                                                                                                                    
108         defp type_to_int(:c)↲ 
109         defp type_to_int(:f)↲                                                                                                     [0/584]
110         defp type_to_int(:bf)↲                                                                                                           
111         defp type_to_int(:s)↲                                                                                                            
112         defp type_to_int(:u)↲                                                                                                            
113 ----↲                                                                                                                                    
114     (nx 0.7.2) lib/nx/type.ex:429: Nx.Type.type_to_int/1↲                                                                                
115     (nx 0.7.2) lib/nx/type.ex:436: Nx.Type.sort/2↲                                                                                       
116     (nx 0.7.2) lib/nx/type.ex:423: Nx.Type.merge/2↲                                                                                      
117     (nx 0.7.2) lib/nx.ex:5399: Nx.element_wise_bin_op/4↲                                                                                 
118     (nx_linear_regression 0.1.0) lib/nx_linear_regression.ex:12: NxLinearRegression."__defn:predict__"/2↲                                
119     (nx_linear_regression 0.1.0) lib/nx_linear_regression.ex:18: NxLinearRegression."__defn:loss__"/3↲                                   
120     (nx 0.7.2) lib/nx/defn/grad.ex:23: Nx.Defn.Grad.transform/3↲                                                                         
121     iex:3: (file)↲
kuroda commented 1 month ago

再現しました。

kuroda commented 1 month ago

【私の方針】