Giter VIP home page Giter VIP logo

memnn's People

Contributors

npow 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

memnn's Issues

Optimization failure due to: local_gpu_careduce

Hi! Thanks for sharing this. I tried to run this, but got some errors. I'm using Theano 0.7.0 and scikit-learn 0.16.1.

I have had success with other Theano toolkits, and the data files are correctly loaded as far as I can tell.

After printing the error below, instead of exiting the program it continues running and printing this message every now and then.

kyle:MemNN kyle$ python main.py 
Using gpu device 0: GeForce GT 750M
args:  Namespace(embedding_size=50, gamma=1, lr=0.1, n_epochs=10, task=1, test_file='', train_file='')
********************************************************************************
epoch:  0
/usr/local/lib/python2.7/site-packages/theano/scan_module/scan_perform_ext.py:133: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility
  from scan_perform.scan_perform import *
<<!! BUG IN FGRAPH.REPLACE OR A LISTENER !!>> <type 'exceptions.TypeError'> ('The type of the replacement must be compatible with the type of the original Variable.', Sum{acc_dtype=float64}.0, HostFromGpu.0, TensorType(float64, scalar), TensorType(float32, scalar), 'local_gpu_careduce') local_gpu_careduce
ERROR (theano.gof.opt): Optimization failure due to: local_gpu_careduce
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/theano/gof/opt.py", line 1527, in process_node
    fgraph.replace_all_validate(repl_pairs, reason=lopt)
  File "/usr/local/lib/python2.7/site-packages/theano/gof/toolbox.py", line 259, in replace_all_validate
    fgraph.replace(r, new_r, reason=reason, verbose=False)
  File "/usr/local/lib/python2.7/site-packages/theano/gof/fg.py", line 474, in replace
    str(reason))
TypeError: ('The type of the replacement must be compatible with the type of the original Variable.', Sum{acc_dtype=float64}.0, HostFromGpu.0, TensorType(float64, scalar), TensorType(float32, scalar), 'local_gpu_careduce')

The grid_search.sh could not run correctly

/home/work/.jumbo/lib/python2.7/site-packages/sklearn/externals/joblib/_multiprocessing_helpers.py:29: UserWarning: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.. joblib will operate in serial mode
warnings.warn('%s. joblib will operate in serial mode' % (e,))
/home/work/.jumbo/lib/python2.7/site-packages/theano/scan_module/scan_perform_ext.py:85: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility
from scan_perform.scan_perform import *
Traceback (most recent call last):
File "main.py", line 245, in
main()
File "main.py", line 242, in main
model.train(args.n_epochs)
File "main.py", line 153, in train
self.create_train(lenW, len(f))
File "main.py", line 118, in create_train
updates=updates)
File "/home/work/.jumbo/lib/python2.7/site-packages/theano/compile/function.py", line 223, in function
profile=profile)
File "/home/work/.jumbo/lib/python2.7/site-packages/theano/compile/pfunc.py", line 490, in pfunc
no_default_updates=no_default_updates)
File "/home/work/.jumbo/lib/python2.7/site-packages/theano/compile/pfunc.py", line 217, in rebuild_collect_shared
raise TypeError(err_msg, err_sug)
TypeError: ('An update must have the same type as the original shared variable (shared_var=<TensorType(float32, matrix)>, shared_var.type=TensorType(float32, matrix), update_val=Elemwise{sub,no_inplace}.0, update_val.type=TensorType(float64, matrix)).', 'If the difference is related to the broadcast pattern, you can call the tensor.unbroadcast(var, axis_to_unbroadcast[, ...]) function to remove broadcastable dimensions.')

What is the role of f_bar ๏ผŸ

cost_arr[2*i], _ = theano.scan(lambda f_bar, t: T.switch(T.or_(T.eq(t, f[i]), T.eq(t, T.shape(L)[0]-1)), 0, T.largest(gamma - s_Ot(T.stack(*m[:i+1]), f[i], t, L), 0)),
                                          sequences=[L, T.arange(T.shape(L)[0])])

It seem to do nothing?

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.