evilsocket / pwnagotchi

(⌐■_■) - Deep Reinforcement Learning instrumenting bettercap for WiFi pwning.
https://pwnagotchi.ai/
Other
7.62k stars 1.15k forks source link

[On HOLD] Update code for tensorflow 2.x #1118

Closed Ra2-IFV closed 3 weeks ago

Ra2-IFV commented 2 years ago

Is your feature request related to a problem? Please describe. StackOverFlow "tf.contrib no longer exist in Tensorflow 2.0.x and it's modules were moved."

Describe the solution you'd like Update codes

Describe alternatives you've considered

Additional context tensorflow 1.x works fine, and this may take a long time, so I think we should not focus on this now. Log

[2022-09-24 20:50:07,645] [ERROR] error while starting AI (No module named 'tensorflow.contrib')
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pwnagotchi/ai/__init__.py", line 21, in load
    from stable_baselines import A2C
  File "/usr/local/lib/python3.9/dist-packages/stable_baselines/__init__.py", line 7, in <module>
    from stable_baselines.deepq import DQN
  File "/usr/local/lib/python3.9/dist-packages/stable_baselines/deepq/__init__.py", line 1, in <module>
    from stable_baselines.deepq.policies import MlpPolicy, CnnPolicy, LnMlpPolicy, LnCnnPolicy
  File "/usr/local/lib/python3.9/dist-packages/stable_baselines/deepq/policies.py", line 2, in <module>
    import tensorflow.contrib.layers as tf_layers
ModuleNotFoundError: No module named 'tensorflow.contrib'
[2022-09-24 20:50:07,672] [WARNING] [ai] AI not loaded!
llamasoft commented 2 years ago

Unfortunately, upgrading to Tensorflow 2 may not be possible for a while. 🙁

Tensorflow 2 requires a 64-bit system but the Raspberry Pi Zero W is 32-bit. The Zero 2 supports 64-bit but the system image pwnagotchi uses is 32-bit.
Adding support for Tensorflow 2 would likely mean dropping support for the original RasPi Zero W. Given that there's a massive Zero W 2 shortage, it's going to be a while before dropping Zero W 1 support is even reasonable.

Ra2-IFV commented 3 weeks ago

Closed as not active