tf-models-nightly 2.18.0.dev20240801__py2.py3-none-any.whl → 2.18.0.dev20240803__py2.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.
@@ -14,11 +14,10 @@
14
14
 
15
15
  """Panoptic Deeplab configuration definition."""
16
16
  import dataclasses
17
+ import math
17
18
  import os
18
19
  from typing import List, Optional, Union
19
20
 
20
- import numpy as np
21
-
22
21
  from official.core import config_definitions as cfg
23
22
  from official.core import exp_factory
24
23
  from official.modeling import hyperparams
@@ -220,7 +219,7 @@ def panoptic_deeplab_resnet_coco() -> cfg.ExperimentConfig:
220
219
  aspp_dilation_rates = [6, 12, 18]
221
220
  multigrid = [1, 2, 4]
222
221
  stem_type = 'v1'
223
- level = int(np.math.log2(output_stride))
222
+ level = int(math.log2(output_stride))
224
223
 
225
224
  config = cfg.ExperimentConfig(
226
225
  runtime=cfg.RuntimeConfig(
@@ -385,7 +384,7 @@ def panoptic_deeplab_mobilenetv3_large_coco() -> cfg.ExperimentConfig:
385
384
  input_size = [640, 640, 3]
386
385
  output_stride = 16
387
386
  aspp_dilation_rates = [6, 12, 18]
388
- level = int(np.math.log2(output_stride))
387
+ level = int(math.log2(output_stride))
389
388
 
390
389
  config = cfg.ExperimentConfig(
391
390
  runtime=cfg.RuntimeConfig(
@@ -547,7 +546,7 @@ def panoptic_deeplab_mobilenetv3_small_coco() -> cfg.ExperimentConfig:
547
546
  input_size = [640, 640, 3]
548
547
  output_stride = 16
549
548
  aspp_dilation_rates = [6, 12, 18]
550
- level = int(np.math.log2(output_stride))
549
+ level = int(math.log2(output_stride))
551
550
 
552
551
  config = cfg.ExperimentConfig(
553
552
  runtime=cfg.RuntimeConfig(
@@ -14,11 +14,10 @@
14
14
 
15
15
  """Semantic segmentation configuration definition."""
16
16
  import dataclasses
17
+ import math
17
18
  import os
18
19
  from typing import List, Optional, Sequence, Union
19
20
 
20
- import numpy as np
21
-
22
21
  from official.core import config_definitions as cfg
23
22
  from official.core import exp_factory
24
23
  from official.modeling import hyperparams
@@ -233,7 +232,7 @@ def seg_deeplabv3_pascal() -> cfg.ExperimentConfig:
233
232
  aspp_dilation_rates = [12, 24, 36] # [6, 12, 18] if output_stride = 16
234
233
  multigrid = [1, 2, 4]
235
234
  stem_type = 'v1'
236
- level = int(np.math.log2(output_stride))
235
+ level = int(math.log2(output_stride))
237
236
  config = cfg.ExperimentConfig(
238
237
  task=SemanticSegmentationTask(
239
238
  model=SemanticSegmentationModel(
@@ -325,7 +324,7 @@ def seg_deeplabv3plus_pascal() -> cfg.ExperimentConfig:
325
324
  aspp_dilation_rates = [6, 12, 18]
326
325
  multigrid = [1, 2, 4]
327
326
  stem_type = 'v1'
328
- level = int(np.math.log2(output_stride))
327
+ level = int(math.log2(output_stride))
329
328
  config = cfg.ExperimentConfig(
330
329
  task=SemanticSegmentationTask(
331
330
  model=SemanticSegmentationModel(
@@ -492,7 +491,7 @@ def mnv2_deeplabv3_pascal() -> cfg.ExperimentConfig:
492
491
  steps_per_epoch = PASCAL_TRAIN_EXAMPLES // train_batch_size
493
492
  output_stride = 16
494
493
  aspp_dilation_rates = []
495
- level = int(np.math.log2(output_stride))
494
+ level = int(math.log2(output_stride))
496
495
  pool_kernel_size = []
497
496
 
498
497
  config = cfg.ExperimentConfig(
@@ -593,7 +592,7 @@ def seg_deeplabv3plus_cityscapes() -> cfg.ExperimentConfig:
593
592
  aspp_dilation_rates = [6, 12, 18]
594
593
  multigrid = [1, 2, 4]
595
594
  stem_type = 'v1'
596
- level = int(np.math.log2(output_stride))
595
+ level = int(math.log2(output_stride))
597
596
  config = cfg.ExperimentConfig(
598
597
  task=SemanticSegmentationTask(
599
598
  model=SemanticSegmentationModel(
@@ -694,7 +693,7 @@ def mnv2_deeplabv3_cityscapes() -> cfg.ExperimentConfig:
694
693
  aspp_dilation_rates = []
695
694
  pool_kernel_size = [512, 1024]
696
695
 
697
- level = int(np.math.log2(output_stride))
696
+ level = int(math.log2(output_stride))
698
697
  config = cfg.ExperimentConfig(
699
698
  task=SemanticSegmentationTask(
700
699
  model=SemanticSegmentationModel(
@@ -14,10 +14,11 @@
14
14
 
15
15
  """Contains definitions of Residual Networks with Deeplab modifications."""
16
16
 
17
- from typing import Callable, Optional, Tuple, List
17
+ import math
18
+ from typing import Callable, List, Optional, Tuple
18
19
 
19
- import numpy as np
20
20
  import tensorflow as tf, tf_keras
21
+
21
22
  from official.modeling import hyperparams
22
23
  from official.modeling import tf_utils
23
24
  from official.vision.modeling.backbones import factory
@@ -238,7 +239,7 @@ class DilatedResNet(tf_keras.Model):
238
239
  else:
239
240
  x = layers.MaxPool2D(pool_size=3, strides=2, padding='same')(x)
240
241
 
241
- normal_resnet_stage = int(np.math.log2(self._output_stride)) - 2
242
+ normal_resnet_stage = int(math.log2(self._output_stride)) - 2
242
243
 
243
244
  endpoints = {}
244
245
  for i in range(normal_resnet_stage + 1):
@@ -14,7 +14,10 @@
14
14
 
15
15
  """Tests for resnet_deeplab models."""
16
16
 
17
+ import math
18
+
17
19
  # Import libraries
20
+
18
21
  from absl.testing import parameterized
19
22
  import numpy as np
20
23
  import tensorflow as tf, tf_keras
@@ -46,10 +49,15 @@ class ResNetTest(parameterized.TestCase, tf.test.TestCase):
46
49
  inputs = tf_keras.Input(shape=(input_size, input_size, 3), batch_size=1)
47
50
  endpoints = network(inputs)
48
51
  print(endpoints)
49
- self.assertAllEqual([
50
- 1, input_size / output_stride, input_size / output_stride,
51
- 512 * endpoint_filter_scale
52
- ], endpoints[str(int(np.math.log2(output_stride)))].shape.as_list())
52
+ self.assertAllEqual(
53
+ [
54
+ 1,
55
+ input_size / output_stride,
56
+ input_size / output_stride,
57
+ 512 * endpoint_filter_scale,
58
+ ],
59
+ endpoints[str(int(math.log2(output_stride)))].shape.as_list(),
60
+ )
53
61
 
54
62
  @parameterized.parameters(
55
63
  ('v0', None, 0.0, False, False),
@@ -82,10 +90,15 @@ class ResNetTest(parameterized.TestCase, tf.test.TestCase):
82
90
  inputs = tf_keras.Input(shape=(input_size, input_size, 3), batch_size=1)
83
91
  endpoints = network(inputs)
84
92
  print(endpoints)
85
- self.assertAllEqual([
86
- 1, input_size / output_stride, input_size / output_stride,
87
- 512 * endpoint_filter_scale
88
- ], endpoints[str(int(np.math.log2(output_stride)))].shape.as_list())
93
+ self.assertAllEqual(
94
+ [
95
+ 1,
96
+ input_size / output_stride,
97
+ input_size / output_stride,
98
+ 512 * endpoint_filter_scale,
99
+ ],
100
+ endpoints[str(int(math.log2(output_stride)))].shape.as_list(),
101
+ )
89
102
 
90
103
  @combinations.generate(
91
104
  combinations.combine(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tf-models-nightly
3
- Version: 2.18.0.dev20240801
3
+ Version: 2.18.0.dev20240803
4
4
  Summary: TensorFlow Official Models
5
5
  Home-page: https://github.com/tensorflow/models
6
6
  Author: Google Inc.
@@ -595,7 +595,7 @@ official/projects/nhnet/utils.py,sha256=9pULza5Cjh31lAtZiRmKlwvzsUkkYWUL4OecYygX
595
595
  official/projects/panoptic/__init__.py,sha256=7oiypy0N82PDw9aSdcJBLVoGTd_oRSUOdvuJhMv4leQ,609
596
596
  official/projects/panoptic/train.py,sha256=rlBGgqJohRQaBUFC_iR-5g2gFNVVBOJMeBcTtbPX-8E,1275
597
597
  official/projects/panoptic/configs/__init__.py,sha256=7oiypy0N82PDw9aSdcJBLVoGTd_oRSUOdvuJhMv4leQ,609
598
- official/projects/panoptic/configs/panoptic_deeplab.py,sha256=afujxe-majo7Wy2nRV8uHKnhF_SmvJwAlBRlgapilkM,26059
598
+ official/projects/panoptic/configs/panoptic_deeplab.py,sha256=iXTd3Fp_xaMkX4z747CNq28b83iEPNr4j_-JM9f6Xhg,26042
599
599
  official/projects/panoptic/configs/panoptic_maskrcnn.py,sha256=cyWDAqVfLTHa_qPwKybehx_ZkHRW9pC_2e5VCgPIjKQ,11613
600
600
  official/projects/panoptic/tasks/__init__.py,sha256=7oiypy0N82PDw9aSdcJBLVoGTd_oRSUOdvuJhMv4leQ,609
601
601
  official/projects/panoptic/tasks/panoptic_deeplab.py,sha256=nMrW7fvpNrNb-5O9jrtps4vL_gaa3wWg2c77LQRo9KU,14723
@@ -971,7 +971,7 @@ official/vision/configs/maskrcnn.py,sha256=yL8kggxXaCTIpSkcozAV2UudO7UqVcEh1_-rM
971
971
  official/vision/configs/maskrcnn_test.py,sha256=Wfkbz30h2qxPcpuu6CEpQsf8I_2df6y10-4bRLsWlj8,1733
972
972
  official/vision/configs/retinanet.py,sha256=oCKinkh4IyPslmI1pakwi6dVziwjkZ2cIcpSoGRjqnM,17806
973
973
  official/vision/configs/retinanet_test.py,sha256=ffS3QufQMLF8FZhKNmi7Yr1RDTnIyZ1XKQ9agr2EyW8,1699
974
- official/vision/configs/semantic_segmentation.py,sha256=4ZAyLWKcFYReyrEWBc5b7wld3mMcuH0RcaRe_4J2RrA,30831
974
+ official/vision/configs/semantic_segmentation.py,sha256=xJbCWl46hTlUkw_S5UeKctdjuAZPTqE6UtSqQaLezYc,30808
975
975
  official/vision/configs/semantic_segmentation_test.py,sha256=va-ZG6CtBKcs0NicZe6WmJvHxPxxih7nB0orNtrRiEA,1867
976
976
  official/vision/configs/video_classification.py,sha256=DDiBq9tCfk3x-FNprWvWc5hLaVAjGLTWgGvXCpElbw4,14549
977
977
  official/vision/configs/video_classification_test.py,sha256=I1HSamxRQ3-f4-YHIeUChnT5CtHCxFQdiL0zy6RRUXU,1879
@@ -1058,8 +1058,8 @@ official/vision/modeling/backbones/mobilenet_test.py,sha256=7cl5eerD5j5UqHL8SLmp
1058
1058
  official/vision/modeling/backbones/resnet.py,sha256=dnYkdlYUzChGLOrQnUbwb9YJ7BDiFwgnLptks7kFb7k,16384
1059
1059
  official/vision/modeling/backbones/resnet_3d.py,sha256=Cq1lrlRqIg9ss_ud1iM_axW9lsTVtGYe3iA4DL9Orzk,18657
1060
1060
  official/vision/modeling/backbones/resnet_3d_test.py,sha256=hhCkW28UXc2peKHGgFl0MnYexFV8qTwEUkMPZ26a_MA,3799
1061
- official/vision/modeling/backbones/resnet_deeplab.py,sha256=RCwLTEGwe4XGPGM5-ELfqdHVJRW35-whoFk6U_PK8Sc,15840
1062
- official/vision/modeling/backbones/resnet_deeplab_test.py,sha256=JXklR7mTi7wWVAPsu48wW5IXzJBLw862uzlKPGdMdps,5520
1061
+ official/vision/modeling/backbones/resnet_deeplab.py,sha256=eHl44lBbvEi231to2-NiLkMiQweax8dGbkELQdC8FQs,15831
1062
+ official/vision/modeling/backbones/resnet_deeplab_test.py,sha256=7bpxr1j0e8mQ5VTMAAQ0d76OVUX2NYKfDL1PlGinhtg,5648
1063
1063
  official/vision/modeling/backbones/resnet_test.py,sha256=rjIFkLsbsUqobectT96jqMygOyCWWih0l9sZbR-Wi9I,5555
1064
1064
  official/vision/modeling/backbones/resnet_unet.py,sha256=2B4VIX2jPqT3aYpH69VSip6zqSeq4WcMFp0_cvEDFxM,21303
1065
1065
  official/vision/modeling/backbones/resnet_unet_test.py,sha256=SPwHtodwfnLnGeEcgK-PZYt_xHDoVe98ULfiKeuI13Q,2615
@@ -1212,9 +1212,9 @@ tensorflow_models/tensorflow_models_test.py,sha256=nc6A9K53OGqF25xN5St8EiWvdVbda
1212
1212
  tensorflow_models/nlp/__init__.py,sha256=4tA5Pf4qaFwT-fIFOpX7x7FHJpnyJT-5UgOeFYTyMlc,807
1213
1213
  tensorflow_models/uplift/__init__.py,sha256=mqfa55gweOdpKoaQyid4A_4u7xw__FcQeSIF0k_pYmI,999
1214
1214
  tensorflow_models/vision/__init__.py,sha256=zBorY_v5xva1uI-qxhZO3Qh-Dii-Suq6wEYh6hKHDfc,833
1215
- tf_models_nightly-2.18.0.dev20240801.dist-info/AUTHORS,sha256=1dG3fXVu9jlo7bul8xuix5F5vOnczMk7_yWn4y70uw0,337
1216
- tf_models_nightly-2.18.0.dev20240801.dist-info/LICENSE,sha256=WxeBS_DejPZQabxtfMOM_xn8qoZNJDQjrT7z2wG1I4U,11512
1217
- tf_models_nightly-2.18.0.dev20240801.dist-info/METADATA,sha256=W-AHm2glrBX8XvFSByp2dUnwnJtDp1zyOc2sBYDUWvk,1432
1218
- tf_models_nightly-2.18.0.dev20240801.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
1219
- tf_models_nightly-2.18.0.dev20240801.dist-info/top_level.txt,sha256=gum2FfO5R4cvjl2-QtP-S1aNmsvIZaFFT6VFzU0f4-g,33
1220
- tf_models_nightly-2.18.0.dev20240801.dist-info/RECORD,,
1215
+ tf_models_nightly-2.18.0.dev20240803.dist-info/AUTHORS,sha256=1dG3fXVu9jlo7bul8xuix5F5vOnczMk7_yWn4y70uw0,337
1216
+ tf_models_nightly-2.18.0.dev20240803.dist-info/LICENSE,sha256=WxeBS_DejPZQabxtfMOM_xn8qoZNJDQjrT7z2wG1I4U,11512
1217
+ tf_models_nightly-2.18.0.dev20240803.dist-info/METADATA,sha256=F3guzvtjxT-14NlHuPYJuPjzAky-wKNuPcr6Tpc9KNk,1432
1218
+ tf_models_nightly-2.18.0.dev20240803.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
1219
+ tf_models_nightly-2.18.0.dev20240803.dist-info/top_level.txt,sha256=gum2FfO5R4cvjl2-QtP-S1aNmsvIZaFFT6VFzU0f4-g,33
1220
+ tf_models_nightly-2.18.0.dev20240803.dist-info/RECORD,,