0-1分布revisit

数据挖掘与概率论
博客涉及数据挖掘和概率论相关内容,数据挖掘可从大量数据中发现有价值信息,概率论是研究随机现象数量规律的数学分支,二者在信息技术领域有重要应用。

以上供参考。

 

[autoreload of cs231n.classifiers.fc_net failed: Traceback (most recent call last): File "D:\miniconda\lib\site-packages\IPython\extensions\autoreload.py", line 276, in check superreload(m, reload, self.old_objects) File "D:\miniconda\lib\site-packages\IPython\extensions\autoreload.py", line 475, in superreload module = reload(module) File "D:\miniconda\lib\importlib\__init__.py", line 169, in reload _bootstrap._exec(spec, module) File "<frozen importlib._bootstrap>", line 619, in _exec File "<frozen importlib._bootstrap_external>", line 879, in exec_module File "<frozen importlib._bootstrap_external>", line 1017, in get_code File "<frozen importlib._bootstrap_external>", line 947, in source_to_code File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "D:\cs231n.github.io-master\assignments\2021\assignment2_colab\assignment2\cs231n\classifiers\fc_net.py", line 80 self.params['W' + str(i + 1)] = np.random.randn(layer_dims[i], layer_dims[i + 1]) * weight_scale TabError: inconsistent use of tabs and spaces in indentation ] --------------------------------------------------------------------------- AxisError Traceback (most recent call last) Cell In[5], line 28 14 model = FullyConnectedNet( 15 [100, 100], 16 weight_scale=weight_scale, 17 dtype=np.float64 18 ) 19 solver = Solver( 20 model, 21 small_data, (...) 26 optim_config={"learning_rate": learning_rate}, 27 ) ---> 28 solver.train() 30 plt.plot(solver.loss_history) 31 plt.title("Training loss history") File D:\cs231n.github.io-master\assignments\2021\assignment2_colab\assignment2\cs231n\solver.py:285, in Solver.train(self) 283 last_it = t == num_iterations - 1 284 if first_it or last_it or epoch_end: --> 285 train_acc = self.check_accuracy( 286 self.X_train, self.y_train, num_samples=self.num_train_samples 287 ) 288 val_acc = self.check_accuracy( 289 self.X_val, self.y_val, num_samples=self.num_val_samples 290 ) 291 self.train_acc_history.append(train_acc) File D:\cs231n.github.io-master\assignments\2021\assignment2_colab\assignment2\cs231n\solver.py:248, in Solver.check_accuracy(self, X, y, num_samples, batch_size) 246 end = (i + 1) * batch_size 247 scores = self.model.loss(X[start:end]) --> 248 y_pred.append(np.argmax(scores, axis=1)) 249 y_pred = np.hstack(y_pred) 250 acc = np.mean(y_pred == y) File D:\miniconda\lib\site-packages\numpy\_core\fromnumeric.py:1342, in argmax(a, axis, out, keepdims) 1253 """ 1254 Returns the indices of the maximum values along an axis. 1255 (...) 1339 (2, 1, 4) 1340 """ 1341 kwds = {'keepdims': keepdims} if keepdims is not np._NoValue else {} -> 1342 return _wrapfunc(a, 'argmax', axis=axis, out=out, **kwds) File D:\miniconda\lib\site-packages\numpy\_core\fromnumeric.py:54, in _wrapfunc(obj, method, *args, **kwds) 52 bound = getattr(obj, method, None) 53 if bound is None: ---> 54 return _wrapit(obj, method, *args, **kwds) 56 try: 57 return bound(*args, **kwds) File D:\miniconda\lib\site-packages\numpy\_core\fromnumeric.py:46, in _wrapit(obj, method, *args, **kwds) 43 # As this already tried the method, subok is maybe quite reasonable here 44 # but this follows what was done before. TODO: revisit this. 45 arr, = conv.as_arrays(subok=False) ---> 46 result = getattr(arr, method)(*args, **kwds) 48 return conv.wrap(result, to_scalar=False) AxisError: axis 1 is out of bounds for array of dimension 1
最新发布
06-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值