bug
zhongxinleishi
这个作者很懒,什么都没留下…
展开
-
Error in nnet.default(x, y, w, ...) : too many (2651) weights
R语言神经网络建模ji.nnet报错Error in nnet.default(x, y, w, ...) : too many (2651) weights解决方法:(都可)(1)减小size(2)设置MaxNWts参数(默认值1000)> 2651注意:MaxNWts首字母大写,在某本书中这个字母小写,所以改完了之后还是报错。原创 2017-07-11 16:37:48 · 3251 阅读 · 2 评论 -
目标检测代码mx-rcnn
(1)demo可以跑通,可以实现自己图片的目标检测python demo.py --prefix final --epoch 0 --imageimage1.jpg --gpu 0 --vis(2)训练bash script/vgg_voc07.sh 0报错:TypeError: init_params() got an unexpected keyword argumen原创 2018-01-04 16:50:18 · 1497 阅读 · 0 评论 -
TypeError: 'float' object cannot be interpreted as an integer
代码:A = np.random.rand(1e4, 1e4).astype('float32')报错:TypeError: 'float' object cannot be interpreted as an integer解决办法:A = np.random.rand(10000, 10000).astype('float32')原创 2017-08-24 15:25:17 · 21960 阅读 · 0 评论 -
TypeError: Input 'b' of 'MatMul' Op has type float32 that does not match type int32 of argument 'a'.
tensorflow word embedding代码:loss = tf.reduce_mean( tf.nn.nce_loss(nce_weights, nce_biases, embed, train_labels, num_sampled, vocabulary_size))报错:TypeError: Input 'b'原创 2017-08-24 12:30:23 · 19086 阅读 · 1 评论 -
TypeError: string argument expected, got 'bytes'
代码:# 导入仿真库import tensorflow as tfimport numpy as np# 导入可视化库import PIL.Imagefrom cStringIO import StringIOfrom IPython.display import clear_output, Image, displayimport scipy.ndimage as nd原创 2017-08-25 13:34:55 · 2152 阅读 · 1 评论 -
Cannot interpret feed_dict key as Tensor: Can not convert a method into a Tensor.
代码:input1 = tf.placeholder(tf.types.float32)input2 = tf.placeholder(tf.types.float32)output = tf.mul(input1, input2)with tf.Session()as sess:print sess.run([output], feed_dict={input:[原创 2017-08-21 13:36:02 · 10077 阅读 · 2 评论 -
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
代码:def convolve(img, W): # The W matrix is only 2D # But conv2d will need a tensor which is 4d: # height x width x n_input x n_output if len(W.get_shape()) == 2: dims =原创 2017-08-21 16:09:46 · 560 阅读 · 0 评论 -
AttributeError: module 'tensorflow' has no attribute 'sub'
代码:import tensorflow as tfsess = tf.InteractiveSession()x = tf.Variable([1.0, 2.0])a = tf.constant([3.0, 3.0])x.initializer.run()sub = tf.sub(x, a)print (sub.eval())报错:Attr原创 2017-08-21 14:22:28 · 1567 阅读 · 0 评论 -
NameError: name 'xrange' is not defined
代码:import tensorflow as tfimport numpy as np# 用 NumPy 随机生成 100 个数据x_data = np.float32(np.random.rand(2, 100)) y_data = np.dot([0.100, 0.200], x_data) + 0.300# 构造一个线性模型b = tf.Vari原创 2017-08-21 13:59:57 · 2169 阅读 · 1 评论 -
TypeError: 'str' object is not callable
from urllib import requestresponse = request.urlopen("http://www.baidu.com/") # 打开网站fi = open("project.txt", 'w') # open一个txt文件page = fi.write(str(response.read()))原创 2017-08-10 15:33:58 · 348 阅读 · 0 评论 -
installation of package ‘car’ had non-zero exit status
R语言安装car包报错:installation of package ‘car’ had non-zero exit status安装程序包‘E:/car_2.1-5.tar.gz’时退出狀態的值不是0升级RR3.3.3升级为R3.4.1car_2.1-5.tar.gz就会变为zip就不会报错了原创 2017-07-11 17:11:16 · 15187 阅读 · 1 评论 -
'E:\Program' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
R语言安装包时报错'E:\Program' 不是内部或外部命令,也不是可运行的程序 或批处理文件。解决方法:把R安装在C盘原创 2017-07-11 17:03:58 · 6094 阅读 · 0 评论 -
目标检测代码Faster-RCNN_TF
(1)编译时报错:/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/platform/default/mutex.h:25:22: fatal error: nsync_cv.h: No such file or directory(之前TFFRCNN-master改用python2.7版本时原创 2018-01-04 16:54:38 · 9272 阅读 · 8 评论