Giter VIP home page Giter VIP logo

machinelearning's People

Contributors

corcovadoming avatar enjoyhot avatar junlulocky avatar poyuwu avatar wepe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machinelearning's Issues

MacOS

.github/workflows/ci.yml

1

Ok

TypeError: can't pickle module objects

File "/home/shaoym/anaconda2/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.name

TypeError: can't pickle module objects

楼主,我在执行您的cnn.py代码时,这个pickle module报上面的错误,不知是什么原因?
不胜感激!

The first layer in a Sequential model must get an `input_shape` or `batch_input_shape` argument.

Traceback (most recent call last):
File "D:/cliff/Programmer-related/GPU_related/kerasѧϰ/dive_into_keras/cnn.py", line 62, in
model = create_model()
File "D:/cliff/Programmer-related/GPU_related/kerasѧϰ/dive_into_keras/cnn.py", line 38, in create_model
model.add(Convolution2D(4, 1, 5, 5, border_mode='valid')) # cliff, add "input_shape"
File "C:\Anaconda2\lib\site-packages\keras\models.py", line 106, in add
raise Exception('The first layer in a Sequential model must '
Exception: The first layer in a Sequential model must get an input_shape or batch_input_shape argument.

keras手写体程序

我运行的时候弹出这个错误信息,是怎么回事
Traceback (most recent call last):
File "G:/MyCode/mmnist/keras_usage/cnn.py", line 85, in
sgd = SGD(l2=0.1,lr=0.05, decay=1e-6, momentum=0.9, nesterov=True)
File "D:\Anaconda2\lib\site-packages\keras-1.0.3-py2.7.egg\keras\optimizers.py", line 117, in init
super(SGD, self).init(**kwargs)
File "D:\Anaconda2\lib\site-packages\keras-1.0.3-py2.7.egg\keras\optimizers.py", line 36, in init
'passed to optimizer: ' + str(k))
Exception: Unexpected keyword argument passed to optimizer: l2

DeepLearning Tutorials:keras_usage:并未找到保存的model.pkl,cnn.py文件中没有用于保存的代码啊?

您好,看到您博文上利用keras训练CNN并保存训练好的CNN模型,并未找到保存的model.pkl,cnn.py文件中没有用于保存的代码啊?
还有,我用cnn做文本分类的,如果想要把每层的输出写到文件里面,留作他用,该怎么操作?
其实,跟您写的cnn_svm**是一致的,提取特征之后再用其他的方法分类,但是不知道文本和图像得到输出的方法是不是一样
麻烦大神了!

Dd

D ddjh

请问 import cPickle 这个包是哪个module下的?

position:

保存训练参数的函数

def save_params(param1, param2, param3, param4):
import cPickle # <-----
write_file = open('params.pkl', 'wb')
cPickle.dump(param1, write_file, -1)
cPickle.dump(param2, write_file, -1)
cPickle.dump(param3, write_file, -1)
cPickle.dump(param4, write_file, -1)
write_file.close()

some problems about Dense layer

When I ran 'MachineLearning-master/DeepLearning Tutorials/keras_usage/cnn.py', it occur these following problems. can you give me some advice?
`C:\Users\Edward\Anaconda2\python.exe "D:/project/Github/MachineLearning-master/DeepLearning Tutorials/keras_usage/cnn.py"
Using Theano backend.

42000 samples
Traceback (most recent call last):
File "D:/project/Github/MachineLearning-master/DeepLearning Tutorials/keras_usage/cnn.py", line 79, in
model.add(Dense(128, init='normal', input_dim=16_4_4))
File "C:\Users\Edward\Anaconda2\lib\site-packages\keras\models.py", line 308, in add
output_tensor = layer(self.outputs[0])
File "C:\Users\Edward\Anaconda2\lib\site-packages\keras\engine\topology.py", line 487, in call
self.build(input_shapes[0])
File "C:\Users\Edward\Anaconda2\lib\site-packages\keras\layers\core.py", line 695, in build
name='{}_W'.format(self.name))
File "C:\Users\Edward\Anaconda2\lib\site-packages\keras\initializations.py", line 36, in normal
return K.random_normal_variable(shape, 0.0, scale, name=name)
File "C:\Users\Edward\Anaconda2\lib\site-packages\keras\backend\theano_backend.py", line 145, in random_normal_variable
return variable(np.random.normal(loc=0.0, scale=scale, size=shape),
File "mtrand.pyx", line 1903, in mtrand.RandomState.normal (numpy\random\mtrand\mtrand.c:18479)
File "mtrand.pyx", line 234, in mtrand.cont2_array_sc (numpy\random\mtrand\mtrand.c:3092)
ValueError: negative dimensions are not allowed

Process finished with exit code 1
`

使用keras的example會發生下面問題?請問該如何解決

Traceback (most recent call last):
File "cnn.py", line 57, in
model.add(Convolution2D(4, 5, 5, border_mode='valid',input_shape=(1,28,28)))
File "/home/leo/anaconda2/lib/python2.7/site-packages/keras/models.py", line 276, in add
layer.create_input_layer(batch_input_shape, input_dtype)
File "/home/leo/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 370, in create_input_layer
self(x)
File "/home/leo/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 514, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "/home/leo/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 572, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/home/leo/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 149, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
File "/home/leo/anaconda2/lib/python2.7/site-packages/keras/layers/convolutional.py", line 466, in call
filter_shape=self.W_shape)
File "/home/leo/anaconda2/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 1639, in conv2d
x = tf.nn.conv2d(x, kernel, strides, padding=padding)
File "/home/leo/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 394, in conv2d
data_format=data_format, name=name)
File "/home/leo/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 703, in apply_op
op_def=op_def)
File "/home/leo/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2312, in create_op
set_shapes_for_outputs(ret)
File "/home/leo/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1704, in set_shapes_for_outputs
shapes = shape_func(op)
File "/home/leo/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 246, in conv2d_shape
padding)
File "/home/leo/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 184, in get2d_conv_output_size
(row_stride, col_stride), padding_type)
File "/home/leo/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 149, in get_conv_output_size
"Filter: %r Input: %r" % (filter_size, input_size))
ValueError: Filter must not be larger than the input: Filter: (5, 5) Input: (1, 28)

help....

MissingInputError: Input 0 of the graph (indices start from 0), used to compute if{}(keras_learning_phase, Elemwise{true_div,no_inplace}.0, Pool{ignore_border=True, mode='max', ndim=2}.0), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.

English

Can you add please your remarks in English

运行cnn.py时报错

Traceback (most recent call last):

File "", line 1, in
debugfile('H:/DeepLearning/cnn_minst_keras/cnn.py', wdir='H:/DeepLearning/cnn_minst_keras')

File "D:\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 888, in debugfile
debugger.run("runfile(%r, args=%r, wdir=%r)" % (filename, args, wdir))

File "D:\Anaconda2\lib\bdb.py", line 400, in run
exec cmd in globals, locals

File "", line 1, in

File "D:\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)

File "D:\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 87, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)

File "h:/deeplearning/cnn_minst_keras/cnn.py", line 9, in
'''

File "D:\Anaconda2\lib\site-packages\keras\models.py", line 308, in add
output_tensor = layer(self.outputs[0])

File "D:\Anaconda2\lib\site-packages\keras\engine\topology.py", line 487, in call
self.build(input_shapes[0])

File "D:\Anaconda2\lib\site-packages\keras\layers\core.py", line 695, in build
name='{}_W'.format(self.name))

File "D:\Anaconda2\lib\site-packages\keras\initializations.py", line 36, in normal
return K.random_normal_variable(shape, 0.0, scale, name=name)

File "D:\Anaconda2\lib\site-packages\keras\backend\theano_backend.py", line 145, in random_normal_variable
return variable(np.random.normal(loc=0.0, scale=scale, size=shape),

File "mtrand.pyx", line 1903, in mtrand.RandomState.normal (numpy\random\mtrand\mtrand.c:18479)

File "mtrand.pyx", line 234, in mtrand.cont2_array_sc (numpy\random\mtrand\mtrand.c:3092)

ValueError: negative dimensions are not allowed

关于SVM的SMO算法的一些疑惑

你好,我对SMO的SVM的代码稍微有一点疑惑,就是关于权重系统$w$的计算的地方,如果核不是线性核,而是高斯核的时候,计算$g(x)$的时候直接用$y*X$是不是不太正确,应该加上核的运算?

谢谢指导

GitHub repo Recommend - L0CV - *Computer Vision in Action*

L0CV 一种结合了代码、图示和HTML的在线学习媒介

L0CV is a new generation of computer vision open source online learning media, a cross-platform interactive learning framework integrating graphics, source code and HTML. the L0CV ecosystem — Notebook, Datasets, Source Code, and from Diving-in to Advanced — as well as the L0CV Hub.

image

image

image

decision Tree 有bug 啊

def _createTree(self,X,y,featureIndex):
有一个返回分支 #所有label都相同的话,则停止分割,返回该label
if labelList.count(labelList[0]) == len(labelList):
return labelList[0]
当输入数据所有的类别都相同的时候,myTree 被y值覆盖了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.