Comments (3)
Hello! Could you please tell me how you ran it successfully?
Because when I ran the 'test.py' whose codes are the same as 'encoder_decoder.py' 's, there's an error I don't know how to deal with :
Traceback (most recent call last):
File "/Users/Downloads/encoder_decoder-master/test.py", line 202, in <module>
main()
File "/Users/Downloads/encoder_decoder-master/test.py", line 184, in main
en_de_model.compile(loss='categorical_crossentropy', optimizer='rmsprop')
File "/Users/Downloads/encoder_decoder-master/keras/models.py", line 507, in compile
self.y_train = self.get_output(train=True)
File "/Users/Downloads/encoder_decoder-master/keras/layers/containers.py", line 130, in get_output
return self.layers[-1].get_output(train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/core.py", line 737, in get_output
X = self.get_input(train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/core.py", line 241, in get_input
previous_output = self.previous.get_output(train=train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/core.py", line 1148, in get_output
X = self.get_input(train) # (samples, timesteps, input_dim)
File "/Users/Downloads/encoder_decoder-master/keras/layers/core.py", line 241, in get_input
previous_output = self.previous.get_output(train=train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/recurrent.py", line 168, in get_output
X = self.get_input(train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/core.py", line 241, in get_input
previous_output = self.previous.get_output(train=train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/core.py", line 926, in get_output
X = self.get_input(train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/core.py", line 241, in get_input
previous_output = self.previous.get_output(train=train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/recurrent.py", line 188, in get_output
preprocessed_input = self.preprocess_input(X, train)
File "/Users/Downloads/encoder_decoder-master/keras/layers/recurrent.py", line 661, in preprocess_input
return K.concatenate([x_i, x_f, x_c, x_o], axis=2)
File "/Users/Downloads/encoder_decoder-master/keras/backend/tensorflow_backend.py", line 267, in concatenate
return tf.concat(axis, tensors)
File "/Users/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "/Users/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1254, in concat
tensor_shape.scalar())
File "/Users/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_shape.py", line 1023, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (4, ?, 5, 20) and () are incompatible
from encoder_decoder.
@JillinJia The backend is Theano, and the version of python is 2.7.
from encoder_decoder.
Halo!
I can't run your code also. (i've already used py2.7 and Theano as backend)
Here is the error:
You can find the C code in this temporary file: /tmp/theano_compilation_error_N1MPcz
Traceback (most recent call last):
File "/home/xenia/GIT/encoder_decoder/encoder_decoder.py", line 6, in <module>
from keras.models import Sequential
File "/home/xenia/GIT/encoder_decoder/keras/models.py", line 15, in <module>
from . import backend as K
File "/home/xenia/GIT/encoder_decoder/keras/backend/__init__.py", line 46, in <module>
from .theano_backend import *
File "/home/xenia/GIT/encoder_decoder/keras/backend/theano_backend.py", line 1, in <module>
import theano
File "/home/xenia/GIT/encoder_decoder/venv/local/lib/python2.7/site-packages/theano/__init__.py", line 110, in <module>
from theano.compile import (
File "/home/xenia/GIT/encoder_decoder/venv/local/lib/python2.7/site-packages/theano/compile/__init__.py", line 12, in <module>
from theano.compile.mode import *
File "/home/xenia/GIT/encoder_decoder/venv/local/lib/python2.7/site-packages/theano/compile/mode.py", line 11, in <module>
import theano.gof.vm
File "/home/xenia/GIT/encoder_decoder/venv/local/lib/python2.7/site-packages/theano/gof/vm.py", line 674, in <module>
from . import lazylinker_c
File "/home/xenia/GIT/encoder_decoder/venv/local/lib/python2.7/site-packages/theano/gof/lazylinker_c.py", line 140, in <module>
preargs=args)
File "/home/xenia/GIT/encoder_decoder/venv/local/lib/python2.7/site-packages/theano/gof/cmodule.py", line 2411, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): /home/xenia/.theano/compiledir_Linux-5.8--generic-x86_64-with-Ubuntu-20.04-focal-x86_64-2.7.18-64/lazylinker_ext/mod.cpp:1:10: fatal error: Python.h: No such file or directory. 1 | #include <Python.h>. | ^~~~~~~~~~. compilation terminated..
from encoder_decoder.
Related Issues (3)
- doesn't work in mode 1-3 HOT 5
- run encoder_decoder.py error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from encoder_decoder.