You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
During capture from an interface, the following error pops up quite often.
Traceback (most recent call last):
File "/home/user/StratosphereLinuxIPS/modules/rnn-cc-detection/rnn-cc-detection.py", line 121, in run
tcpmodel = load_model(model_file)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/saving/save.py", line 200, in load_model
return hdf5_format.load_model_from_hdf5(filepath, custom_objects,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 180, in load_model_from_hdf5
model = model_config_lib.model_from_config(model_config,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/saving/model_config.py", line 52, in model_from_config
return deserialize(config, custom_objects=custom_objects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/layers/serialization.py", line 118, in deserialize
return generic_utils.deserialize_keras_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/utils/generic_utils.py", line 674, in deserialize_keras_object
deserialized_obj = cls.from_config(
^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/engine/sequential.py", line 496, in from_config
layer = layer_module.deserialize(layer_config,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/layers/serialization.py", line 118, in deserialize
return generic_utils.deserialize_keras_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/utils/generic_utils.py", line 659, in deserialize_keras_object
(cls, cls_config) = class_and_config_for_serialized_keras_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/slips/lib/python3.11/site-packages/tensorflow/python/keras/utils/generic_utils.py", line 556, in class_and_config_for_serialized_keras_object
raise ValueError(
ValueError: Unknown layer: Bidirectional. Please ensure this object is passed to the `custom_objects` argument. See https://www.tensorflow.org/guide/keras/save_and_serialize#registering_the_custom_object for details.
Note that I am receiving a TZSP stream from a router and replaying it to a dummy interface.
To Reproduce
Steps to reproduce the behavior:
Set network interface to promisc (or use a dummy interface with tcpreplay)
./slips.py -c config/slips.conf -i
Confirm data eg tcpdump -i -c 10
Wait for error to appear
Expected behavior
No value errors should appear during normal operation/during an interface capture.
Branch
Have tested both Master and Develop, issue seen on both.
Environment (please complete the following information):
OS: Ubuntu (Raspberri Pi/ARM64)
Version: 23.04 (Linux 6.2.0-1004-raspi)
Python version: Python 3.11.2
Are you running slips in docker or locally? Locally
Additional context
This is running on a Raspberry Pi 4, no GPU (or NPU).
I'm using the following python modules:
tensorflow==2.12.0
keras==2.12.0
Really guessing here, but the following made the error go away but I have no idea of the ramifications. Just doing what the error told me to do :)
At the beginning of rnn-cc-detection.py, load an additional class and assign a variable.
from tensorflow.keras.layers import Bidirectional
custom_objects = {'Bidirectional': Bidirectional}
Then change the following line to pass it along to the load_model method via its custom_objects argument:
Describe the bug
During capture from an interface, the following error pops up quite often.
Note that I am receiving a TZSP stream from a router and replaying it to a dummy interface.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No value errors should appear during normal operation/during an interface capture.
Branch
Have tested both Master and Develop, issue seen on both.
Environment (please complete the following information):
Additional context
This is running on a Raspberry Pi 4, no GPU (or NPU).
I'm using the following python modules:
Really guessing here, but the following made the error go away but I have no idea of the ramifications. Just doing what the error told me to do :)
At the beginning of rnn-cc-detection.py, load an additional class and assign a variable.
Then change the following line to pass it along to the load_model method via its custom_objects argument:
The text was updated successfully, but these errors were encountered: