• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: AttributeError: ‘Sequential’ object has no attribute ‘model’

Resolved: AttributeError: ‘Sequential’ object has no attribute ‘model’

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am trying to understand Double Deep Q-Learning. There is a pretty good lecture here: https://github.com/philtabor/Youtube-Code-Repository/tree/master/ReinforcementLearning/DeepQLearning
But when I tried to run the code, I got following errors:
And I have no clue on how to fix this. I guess keras has been updated to not allow this?
The different lines are respectively:
line 33:
line 118 (in def learn(self):):
line 121 (in def update_network_parameters(self):):
line 76:
EDIT: updated the problem based on suggestions in the comment section. The suggestion was that I put a tensforflow. in front of keras in the imports. I get the same error as before (as you can see). Here is how the imports look like now:
enter image description here

Answer:

For solving your error you can go through the below steps:
1. Install dependency for can run the env:
2. Change imports like below:
3. Install tf-nightly: (what is tf-nightly)

If you have better answer, please add a comment about this, thank you!

keras keras-layer python reinforcement-learning tensorflow
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: std::regex_replace to replace multiple combinations

26/03/2023

Resolved: How can I copy files using the ansible.builtin.copy module and avoid conflicting file names?

26/03/2023

Resolved: Reshape tensors of unknown shape with tf.function

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.