New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keras - Python 3.6 support #7297
Comments
Yes. Currently using 3.6.0 with Keras 2.0.6, no problem with it. |
Let me welcome you to the flexible and also beautiful world of Anaconda environments, where you don't need to downgrade anything, you just install exactly that version that you need in parallel to your existing python distribution on whatever platform you are on. |
In any case if you find anything in the codebase that is incompatible with
Py3.6, that should be fixed, so either report it, or send a PR to fix it
(preferred).
…On 11 July 2017 at 01:30, hutauf ***@***.***> wrote:
Let me welcome you to the flexible and also beautiful world of Anaconda
environments, where you don't need to downgrade anything, you just install
exactly that version that you need in parallel to your existing python
distribution on whatever platform you are on.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7297 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArWb5CwRjCfaACU8n4zAOJNRo4wm3HPks5sMzKJgaJpZM4OTl4N>
.
|
I found two Python 3 issues below. For the first one, the fix would be something along the lines of The second is an issue that a linter like flake8 would catch but should not be a problem for users, I put a fix in anyway in #7300. I tried to add flake8 to the testing but I failed:
|
With Windows 10, Keras 2.0.6, Python 3.6.1 I'm getting a
The model is as described here. I have no problems when I switch to Python 3.5.3. |
A "SystemError" cannot be a problem with Keras. Semantically, it's an
internal problem encountered by your Python interpreter.
…On 23 July 2017 at 15:48, Ryan Fox ***@***.***> wrote:
With Windows 10, Keras 2.0.6, Python 3.6.1 I'm getting a SystemError:
Unknown opcode when I run the line
keras.models.load_model('yolo.h5')
The model is as described here
<https://github.com/allanzelener/YAD2K/blob/a42c760ef868bc115e596b56863dc25624d2e756/README.md#quick-start>.
I have no problems when I switch to Python 3.5.3.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7297 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArWb6hVLpvLy6TgDM3NwtOl27AVlJDXks5sQ83MgaJpZM4OTl4N>
.
|
Got it. Possibly a tensorflow issue? In any case, 3.5 is working for me, so I have a workaround. Thank you. |
Runs just fine with mine now, I think I only had issues before bc I had trouble with TF installation on PC (was 1000x easier on a Mac). |
Had exactly the same problem, dropping to 3.5 also fixed it for me |
Why this issue is closed ? |
Sorry, I found my problem. P.S. my testing environment was ubuntu 16.04 + conda python 3.6.2 + keras 1.2.0 |
@dmitriyse how did you convert compiled lambda function? I am facing same issue. |
To match [setup.py](https://github.com/fchollet/keras/blob/master/setup.py#L34). There are a number of questions raised in keras-team#7297 about Python 3.6 support so let's test that version.
@adityapatadia, hopefully I found python sources for my model. I don't know any solution to convert python 3.X binary to python 3.Y binary. |
To match [setup.py](https://github.com/fchollet/keras/blob/master/setup.py#L34). There are a number of questions raised in #7297 about Python 3.6 support so let's test that version.
@dmitriyse I ended up training my model under python 3.6 and use it. |
Hi, I was facing a similar issue. I tried the following
PS : The same worked for me |
You can use |
@dmitriyse , How you have regenerated the model? I have downloaded the weight from someone else google drive and using the "YOLOv2" model from . My system conda environment configuration:
Also, could you please explain how a model could be system specific? any suggestions? |
@anubhav0fnu, no any magic. I have some another DB with the model and performed transform from this source to Keras model under python 3.6. I haven't found any way to convert from 3.5 to 3.6. |
I m getting the same error ''SystemError: unknown opcode'' with Python 3.5,3.6,3.7 |
Please provide a full stack trace of the error. |
@cclauss |
The first and last calls in this stack trace are D:/ML/One_shot_detection. What package is that? |
@cclauss def build_model_network(): model.add(Conv2D(input_shape=(128,128,3) , filters=64 ,kernel_size=(10,10), activation=relu)) model.add(BatchNormalization()) model.add(Dropout(0.1)) model.add(MaxPool2D(pool_size=(2,2))) model.add(Conv2D(filters=128 , kernel_size=(7,7) , activation=relu)) model.add(BatchNormalization()) model.add(MaxPool2D(pool_size=(2,2))) model.add(Conv2D(filters=128 , kernel_size=(4,4) , activation=relu)) model.add(BatchNormalization()) model.add(MaxPool2D(pool_size=(2,2))) model.add(Conv2D(filters=256 , kernel_size=(4,4) , activation=relu)) model.add(BatchNormalization()) model.add(Dropout(rate=0.1)) model.add(Flatten()) model.add(Dense(units=4096 , activation=sigmoid)) return model output_x1 = model(input_x1) def euclidean_distance(vects): def contrastive_loss(y_true, y_pred): distance = Lambda(euclidean_distance)([output_x1 , output_x2]) rms = rmsprop() model = Model([input_x1 , input_x2] , output_) X1 = np.load('numpy_files/X1.npy',allow_pickle=True) data_dimension = 128 model.fit([X11,X22] , Y , batch_size=5 , epochs=1 , validation_split=None ) #I tried to save and load my model by two ways but getting the same error in both |
Pasting code in this way loses all indentation. Please edit the code above to add three backticks ``` on a separate line before the code and another three backticks on a separate line after the code. |
Lambda layer was causing the problem , now its resolved. |
@Sparsh-Bansal I used Lambda layer and have same error, how to resolve it? |
|
Will #Keras work with Python 3.6? I'm really tired of downgrading my different versions of Python at this point.
The text was updated successfully, but these errors were encountered: