![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
qq_36033919
这个作者很懒,什么都没留下…
展开
-
BGD+交叉熵实现二分类,数据和题目来自CS229监督学习的课后题
#coding=utf-8 #CS229 BGD+LR import numpy as np import pandas as pd import math def sigmoid(x): return 1.0/(1+np.exp(-x)) def CrossEntropy(w0,x,y): predict_error=np.sum(w0 * x.T,axis=1) y...原创 2019-11-28 21:27:58 · 126 阅读 · 0 评论 -
Python3在函数中调用pool.map函数global变量无法完成修改
Python3在函数中调用pool.map函数global变量无法完成修改,如图,用python3运行APR算法出现的问题,py2.7没问题:原创 2019-03-21 09:04:28 · 1364 阅读 · 7 评论 -
解决ValueError: Cannot feed value of shape (1,) for Tensor 'Placeholder_1:0', which has shape '(?, 1)'
我的问题出现在如下代码段: feed_dict = {model.user_input: user_input[i], model.item_input_pos: item_input_pos[i], model.item_input_neg: item_input_neg[i]} if output_adv: loss, outpu...原创 2019-04-02 10:49:20 · 15041 阅读 · 3 评论