keras-nightly 3.14.0.dev2026011304__py3-none-any.whl → 3.14.0.dev2026011404__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1394,7 +1394,66 @@ def isreal(x):
1394
1394
 
1395
1395
 
1396
1396
  def kron(x1, x2):
1397
- raise NotImplementedError("`kron` is not supported with openvino backend")
1397
+ x1 = get_ov_output(x1)
1398
+ x2 = get_ov_output(x2)
1399
+ x1, x2 = _align_operand_types(x1, x2, "kron()")
1400
+ x1_shape = x1.get_partial_shape()
1401
+ x2_shape = x2.get_partial_shape()
1402
+ if x1_shape.rank.is_dynamic or x2_shape.rank.is_dynamic:
1403
+ raise ValueError(
1404
+ "`kron` does not support tensors with dynamic rank for "
1405
+ "the OpenVINO backend."
1406
+ )
1407
+ ndim1 = x1_shape.rank.get_length()
1408
+ ndim2 = x2_shape.rank.get_length()
1409
+ if ndim1 < ndim2:
1410
+ axes = ov_opset.range(
1411
+ ov_opset.constant(0, Type.i32),
1412
+ ov_opset.constant(ndim2 - ndim1, Type.i32),
1413
+ ov_opset.constant(1, Type.i32),
1414
+ )
1415
+ x1 = ov_opset.unsqueeze(x1, axes)
1416
+ ndim1 = ndim2
1417
+ elif ndim2 < ndim1:
1418
+ axes = ov_opset.range(
1419
+ ov_opset.constant(0, Type.i32),
1420
+ ov_opset.constant(ndim1 - ndim2, Type.i32),
1421
+ ov_opset.constant(1, Type.i32),
1422
+ )
1423
+ x2 = ov_opset.unsqueeze(x2, axes)
1424
+ ndim2 = ndim1
1425
+ shape1 = ov_opset.shape_of(x1, Type.i32)
1426
+ shape2 = ov_opset.shape_of(x2, Type.i32)
1427
+ ones = ov_opset.broadcast(
1428
+ ov_opset.constant(1, Type.i32), ov_opset.constant([ndim1], Type.i32)
1429
+ )
1430
+ axis = ov_opset.constant(1, Type.i32)
1431
+ flatten = ov_opset.constant([-1], Type.i32)
1432
+ unsqueezed_ones = ov_opset.unsqueeze(ones, axis)
1433
+ x1_new_shape = ov_opset.reshape(
1434
+ ov_opset.concat(
1435
+ [ov_opset.unsqueeze(shape1, axis), unsqueezed_ones],
1436
+ axis=1,
1437
+ ),
1438
+ flatten,
1439
+ False,
1440
+ )
1441
+ x2_new_shape = ov_opset.reshape(
1442
+ ov_opset.concat(
1443
+ [unsqueezed_ones, ov_opset.unsqueeze(shape2, axis)],
1444
+ axis=1,
1445
+ ),
1446
+ flatten,
1447
+ False,
1448
+ )
1449
+ result = ov_opset.multiply(
1450
+ ov_opset.reshape(x1, x1_new_shape, False),
1451
+ ov_opset.reshape(x2, x2_new_shape, False),
1452
+ )
1453
+ result = ov_opset.reshape(
1454
+ result, ov_opset.multiply(shape1, shape2), False
1455
+ ).output(0)
1456
+ return OpenVINOKerasTensor(result)
1398
1457
 
1399
1458
 
1400
1459
  def lcm(x1, x2):
@@ -2226,7 +2285,14 @@ def sinh(x):
2226
2285
 
2227
2286
 
2228
2287
  def size(x):
2229
- raise NotImplementedError("`size` is not supported with openvino backend")
2288
+ x = get_ov_output(x)
2289
+ shape_tensor = ov_opset.shape_of(x, output_type=Type.i64)
2290
+ final_size = ov_opset.reduce_prod(
2291
+ shape_tensor,
2292
+ ov_opset.constant([0], Type.i64),
2293
+ keep_dims=False,
2294
+ )
2295
+ return OpenVINOKerasTensor(final_size.output(0))
2230
2296
 
2231
2297
 
2232
2298
  def sort(x, axis=-1):
@@ -2368,9 +2434,20 @@ def std(x, axis=None, keepdims=False):
2368
2434
 
2369
2435
 
2370
2436
  def swapaxes(x, axis1, axis2):
2371
- raise NotImplementedError(
2372
- "`swapaxes` is not supported with openvino backend"
2373
- )
2437
+ x = get_ov_output(x)
2438
+ x_shape = x.get_partial_shape()
2439
+ if x_shape.rank.is_dynamic:
2440
+ raise ValueError(
2441
+ "`swapaxes` does not support tensors with dynamic rank for the "
2442
+ "OpenVINO backend."
2443
+ )
2444
+ rank = x_shape.rank.get_length()
2445
+ axis1 = canonicalize_axis(axis1, rank)
2446
+ axis2 = canonicalize_axis(axis2, rank)
2447
+ axes = list(range(rank))
2448
+ axes[axis1], axes[axis2] = axes[axis2], axes[axis1]
2449
+ result = ov_opset.transpose(x, ov_opset.constant(axes, Type.i32))
2450
+ return OpenVINOKerasTensor(result.output(0))
2374
2451
 
2375
2452
 
2376
2453
  def take(x, indices, axis=None):
keras/src/version.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from keras.src.api_export import keras_export
2
2
 
3
3
  # Unique source of truth for the version number.
4
- __version__ = "3.14.0.dev2026011304"
4
+ __version__ = "3.14.0.dev2026011404"
5
5
 
6
6
 
7
7
  @keras_export("keras.version")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: keras-nightly
3
- Version: 3.14.0.dev2026011304
3
+ Version: 3.14.0.dev2026011404
4
4
  Summary: Multi-backend Keras
5
5
  Author-email: Keras team <keras-users@googlegroups.com>
6
6
  License: Apache License 2.0
@@ -128,7 +128,7 @@ keras/regularizers/__init__.py,sha256=542Shphw7W8h4Dyf2rmqMKUECVZ8IVBvN9g1LWhz-b
128
128
  keras/saving/__init__.py,sha256=KvL2GZxjvgFgEhvEnkvqjIR9JSNHKz-NWZacXajsjLI,1298
129
129
  keras/src/__init__.py,sha256=Gi4S7EiCMkE03PbdGNpFdaUYySWDs_FcAJ8Taz9Y1BE,684
130
130
  keras/src/api_export.py,sha256=gXOkBOnmscV013WAc75lc4Up01-Kkg9EylIAT_QWctg,1173
131
- keras/src/version.py,sha256=6Xtelgtl2s2j5h0H2_ulwbg1pYur71GFnblVZ9ACMxk,204
131
+ keras/src/version.py,sha256=w8F4qXHXwmNxkt7YJdj-CSjcFul2E8ddmb8Thwa2k5c,204
132
132
  keras/src/activations/__init__.py,sha256=0nL3IFDB9unlrMz8ninKOWo-uCHasTUpTo1tXZb2u44,4433
133
133
  keras/src/activations/activations.py,sha256=mogPggtp4CGldI3VOPNmesRxp6EbiR1_i4KLGaVwzL8,17614
134
134
  keras/src/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -198,7 +198,7 @@ keras/src/backend/openvino/layer.py,sha256=5RdvaH1yOyPAphjKiuQAK1H_yZFYKE1Hp7c5b
198
198
  keras/src/backend/openvino/linalg.py,sha256=L6a4MFGND2wWzPVCh44cwuOgkcC4wJTo8Xy3HwW04lg,1614
199
199
  keras/src/backend/openvino/math.py,sha256=qw9kX2sJ2qr0dBJF12Ey0E2GcwixPUqoev6UcNra4NI,3944
200
200
  keras/src/backend/openvino/nn.py,sha256=zULPxdwVO7JDZUUtsuoEEPCLQ09ew8z8T6G_i_NEqrM,23741
201
- keras/src/backend/openvino/numpy.py,sha256=vntuKwGOeBnIw24ocaEE6rDfzTaqvw_EKDHgDvMkSeI,101312
201
+ keras/src/backend/openvino/numpy.py,sha256=iRzcXqc8Aq_sLh5TgFiLCtgHLfotvI-S29KGwocIN68,103924
202
202
  keras/src/backend/openvino/random.py,sha256=4hRUtIP6qJxO3Qy9uH1x6jSuJna3nWPdUf4x2QU8-ew,5575
203
203
  keras/src/backend/openvino/rnn.py,sha256=ErmuZLPSgG9qU-NfYPPvBZ6Ysy8k-fA4g19Vhqq7OVQ,866
204
204
  keras/src/backend/openvino/trainer.py,sha256=bMmtSALqydqdS6ke-5sYW5fgxZDshDH810p_C0xCRTg,9087
@@ -615,7 +615,7 @@ keras/utils/bounding_boxes/__init__.py,sha256=jtvQll4u8ZY0Z96HwNhP1nxWEG9FM3gI-6
615
615
  keras/utils/legacy/__init__.py,sha256=oSYZz6uS8UxSElRaaJYWJEoweJ4GAasZjnn7fNaOlog,342
616
616
  keras/visualization/__init__.py,sha256=UKWmiy6sps4SWlmQi9WX8_Z53cPpLlphz2zIeHdwJpQ,722
617
617
  keras/wrappers/__init__.py,sha256=QkS-O5K8qGS7C3sytF8MpmO6PasATpNVGF8qtb7Ojsw,407
618
- keras_nightly-3.14.0.dev2026011304.dist-info/METADATA,sha256=VvTqhhwTIlxRsKL9og2HY3vWDoIfXS2ITQ2jU8Mt2X4,6339
619
- keras_nightly-3.14.0.dev2026011304.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
620
- keras_nightly-3.14.0.dev2026011304.dist-info/top_level.txt,sha256=ptcw_-QuGZ4ZDjMdwi_Z0clZm8QAqFdvzzFnDEOTs9o,6
621
- keras_nightly-3.14.0.dev2026011304.dist-info/RECORD,,
618
+ keras_nightly-3.14.0.dev2026011404.dist-info/METADATA,sha256=kQdBx6UVd9ve6T2k1-rLnycFlcoNFSJWmzXOerCw39g,6339
619
+ keras_nightly-3.14.0.dev2026011404.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
620
+ keras_nightly-3.14.0.dev2026011404.dist-info/top_level.txt,sha256=ptcw_-QuGZ4ZDjMdwi_Z0clZm8QAqFdvzzFnDEOTs9o,6
621
+ keras_nightly-3.14.0.dev2026011404.dist-info/RECORD,,