Skip to content
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

Fixed keras imports by using tensorflow.keras instead of just keras #1250

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion deep_learning4e.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import statistics

import numpy as np
from keras import Sequential, optimizers
from tensorflow import keras
from tensorflow.keras import Sequential, optimizers
from keras.layers import Embedding, SimpleRNN, Dense
from keras.preprocessing import sequence

Expand Down
2 changes: 1 addition & 1 deletion perception4e.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Perception (Chapter 24)"""

import cv2
import keras
from tensorflow import keras
import matplotlib.pyplot as plt
import numpy as np
import scipy.signal
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ pytest-cov
qpsolvers
scipy
sortedcontainers
tensorflow
tensorflow>=2.6.0
1 change: 1 addition & 0 deletions tests/test_deep_learning4e.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
from tensorflow import keras
from keras.datasets import imdb

from deep_learning4e import *
Expand Down