cnevd / deeplearning-mxnet Goto Github PK
View Code? Open in Web Editor NEWMXNet for CTR
MXNet for CTR
how to made data twitter.pkl??
Hi, it's so kind of you to provide the code of DCNN.
I run it and encounter an error.
It'sFile "D:\Anaconda3\lib\site-packages\mxnet-0.7.0-py3.5.egg\mxnet\base.py", line 77, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: Invalid Parameter format for pad expect Shape(tuple) but value='(3.5, 0)'
In this line https://github.com/CNevd/DeepLearning-Mxnet/blob/master/DCNN/dcnn_train.py#L88
the pad=(7/2=3.5, 0), but it should be an int.
And I think the output shape of 1-dim wide convolution should be (s+w-1, xxx) in this paper.
If the input shape of the conv_layer is (batch_size, 1, sentence_size, embed_num), the pad of the convlayer should be (kernel_size-1, 0), instead of (kernel_size/2, 0).
For example,
data = mx.sym.Variable('data')
conv = mx.sym.Convolution(data=data, kernel=(7,1), num_filter=6, pad=(7-1,0))
arg_shapes, output_shape, _ = conv.infer_shape(data=(50,1,100,300))
output_shape
Out[6]: [(50, 6, 106, 300)]
106 = s+w-1 = 100+7-1
Please do not hesitate to correct me if I am wrong.
Many thanks!
have you encountered this?
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "D:\Anaconda3\lib\site-packages\mxnet-0.7.0-py3.5.egg\mxnet\operator.py", line 600, in creator
op_prop = prop_cls(**kwargs)
TypeError: __init__() keywords must be strings
Traceback (most recent call last):
File "D:/DeepLearning-MXNet-master/DCNN/dcnn_train.py", line 196, in <module>
train_dcnn(args,ctx)
File "D:/DeepLearning-MXNet-master/DCNN/dcnn_train.py", line 126, in train_dcnn
dcnn = get_dcnn(sentence_size, args.embed_size, args.batch_size, vocab_size)
File "D:/DeepLearning-MXNet-master/DCNN/dcnn_train.py", line 97, in get_dcnn
pool_outi = mx.symbol.Custom(data=fold_outi, name='k_max_pool%s' % i, op_type='k_max_pool', k=ki)
File "D:\Anaconda3\lib\site-packages\mxnet-0.7.0-py3.5.egg\mxnet\symbol.py", line 1062, in creator
ctypes.byref(sym_handle)))
OSError: exception: access violation writing 0x000000D9C3076930
seems the k max pooling init failed.
how to solve it?
thanks a lot
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.