We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent becdcba commit a9f636fCopy full SHA for a9f636f
tests/keras2onnx_applications/nightly_build/test_resnext.py
@@ -7,7 +7,12 @@
7
import numpy as np
8
from mock_keras2onnx.proto import keras
9
from mock_keras2onnx.proto.tfcompat import is_tf2
10
-from keras.regularizers import l2
+if is_tf2:
11
+ def l2(weight_decay):
12
+ # old keras layer expects a tuple but tf keras wants a single value
13
+ return keras.regularizers.l2(weight_decay[0])
14
+else:
15
+ from keras.regularizers import l2
16
from os.path import dirname, abspath
17
sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../../keras2onnx_tests/'))
18
img_path = os.path.join(os.path.dirname(__file__), '../data', 'street.jpg')
0 commit comments