Code Monkey home page Code Monkey logo

youtubecommenter's Issues

Error in Train.py: I've been trying to figure it out for an hour now

So everything runs fine until the line:
batch_loss, batch_acc = model.train_on_batch([title_batch, past_batch], [pred_batch])

I figured it was a syntax error or something so I did some research. Although I've didn't see it used this way, there was nothing wrong with the syntax. So I updated all of my Libraries and tried it again. Still the same error. No matter what I did, I couldn't get it to work. If anyone cares, or is even out there (this is not a maintained repository so maybe I'm alone), your help would be immensely appreciated.

Here's the full error log. pls help me

Traceback (most recent call last):
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call
return fn(*args)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1305, in _run_fn
self._extend_graph()
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1340, in _extend_graph
tf_session.ExtendSession(self._session)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'CudnnRNN' with these attrs. Registered devices: [CPU], Registered kernels:

[[Node: cu_dnngru_1/CudnnRNN = CudnnRNN[T=DT_FLOAT, direction="unidirectional", dropout=0, input_mode="linear_input", is_training=true, rnn_mode="gru", seed=87654321, seed2=0](cu_dnngru_1/transpose, cu_dnngru_1/ExpandDims_1, cu_dnngru_1/Const_1, cu_dnngru_1/concat)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/(Censored)/PycharmProjects/YouTubeCommenter/Train.py", line 170, in
batch_loss, batch_acc = model.train_on_batch([title_batch, past_batch], [pred_batch])
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\training.py", line 1449, in train_on_batch
outputs = self.train_function(ins)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\tensorflow_backend.py", line 2947, in call
if hasattr(get_session(), '_make_callable_from_options'):
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\tensorflow_backend.py", line 204, in get_session
[tf.is_variable_initialized(v) for v in candidate_vars])
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 900, in run
run_metadata_ptr)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run
run_metadata)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1335, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'CudnnRNN' with these attrs. Registered devices: [CPU], Registered kernels:

[[Node: cu_dnngru_1/CudnnRNN = CudnnRNN[T=DT_FLOAT, direction="unidirectional", dropout=0, input_mode="linear_input", is_training=true, rnn_mode="gru", seed=87654321, seed2=0](cu_dnngru_1/transpose, cu_dnngru_1/ExpandDims_1, cu_dnngru_1/Const_1, cu_dnngru_1/concat)]]

Caused by op 'cu_dnngru_1/CudnnRNN', defined at:
File "C:/Users/(Censored)/PycharmProjects/YouTubeCommenter/Train.py", line 94, in
x = CuDNNGRU(200, return_sequences=USE_OUT_SEQ)(x)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\layers\recurrent.py", line 533, in call
return super(RNN, self).call(inputs, **kwargs)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\base_layer.py", line 450, in call
output = self.call(inputs, **kwargs)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\layers\cudnn_recurrent.py", line 90, in call
output, states = self._process_batch(inputs, initial_state)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\layers\cudnn_recurrent.py", line 297, in _process_batch
is_training=True)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\cudnn_rnn\python\ops\cudnn_rnn_ops.py", line 1621, in call
seed=self._seed)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\cudnn_rnn\python\ops\cudnn_rnn_ops.py", line 1010, in _cudnn_rnn_no_input_c
direction, dropout, seed, name)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\cudnn_rnn\python\ops\cudnn_rnn_ops.py", line 922, in _cudnn_rnn
outputs, output_h, output_c, _ = gen_cudnn_rnn_ops.cudnn_rnn(**args)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\gen_cudnn_rnn_ops.py", line 143, in cudnn_rnn
is_training=is_training, name=name)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
op_def=op_def)
File "C:\Users(Censored)\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 1740, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'CudnnRNN' with these attrs. Registered devices: [CPU], Registered kernels:

[[Node: cu_dnngru_1/CudnnRNN = CudnnRNN[T=DT_FLOAT, direction="unidirectional", dropout=0, input_mode="linear_input", is_training=true, rnn_mode="gru", seed=87654321, seed2=0](cu_dnngru_1/transpose, cu_dnngru_1/ExpandDims_1, cu_dnngru_1/Const_1, cu_dnngru_1/concat)]]

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.