repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/tests/mosaic/gpu_constraints_test.py
tests/mosaic/gpu_constraints_test.py
# Copyright 2025 The JAX Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/tests/mosaic/matmul_test.py
tests/mosaic/matmul_test.py
# Copyright 2024 The JAX Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/build.py
build/build.py
#!/usr/bin/env python3 # # Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/tools/command.py
build/tools/command.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/tools/utils.py
build/tools/utils.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/rocm/run_single_gpu.py
build/rocm/run_single_gpu.py
#!/usr/bin/env python3 # Copyright 2022 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/rocm/dev_build_rocm.py
build/rocm/dev_build_rocm.py
# !/usr/bin/env python3 # # Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/rocm/tools/symbols.py
build/rocm/tools/symbols.py
#!/usr/bin/env python3 # Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/rocm/tools/build_wheels.py
build/rocm/tools/build_wheels.py
#!/usr/bin/env python3 # Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/rocm/tools/libc.py
build/rocm/tools/libc.py
#!/usr/bin/env python3 # Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/rocm/tools/fixwheel.py
build/rocm/tools/fixwheel.py
#!/usr/bin/env python3 # Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/build/rocm/tools/get_rocm.py
build/rocm/tools/get_rocm.py
#!/usr/bin/env python3 # Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/array_refs.py
docs/array_refs.py
# --- # Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/autodidax2_part1.py
docs/autodidax2_part1.py
# --- # Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/autodidax.py
docs/autodidax.py
# --- # Copyright 2021 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
true
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/__init__.py
docs/__init__.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/conf.py
docs/conf.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/the-training-cookbook.py
docs/the-training-cookbook.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/sphinxext/jax_extensions.py
docs/sphinxext/jax_extensions.py
# Copyright 2021 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/sphinxext/jax_list_config_options.py
docs/sphinxext/jax_list_config_options.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/sphinxext/source_include.py
docs/sphinxext/source_include.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/_static/fault_tolerance/dont_fail.py
docs/_static/fault_tolerance/dont_fail.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/_static/fault_tolerance/data_parallelism_with_recovery.py
docs/_static/fault_tolerance/data_parallelism_with_recovery.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/_static/fault_tolerance/data_parallelism.py
docs/_static/fault_tolerance/data_parallelism.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/_static/fault_tolerance/cancel_collectives.py
docs/_static/fault_tolerance/cancel_collectives.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/_static/fault_tolerance/while_loop.py
docs/_static/fault_tolerance/while_loop.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/_static/fault_tolerance/live_devices.py
docs/_static/fault_tolerance/live_devices.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/docs/_static/fault_tolerance/collectives.py
docs/_static/fault_tolerance/collectives.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/gaussian_process_regression.py
examples/gaussian_process_regression.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/datasets.py
examples/datasets.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/onnx2xla.py
examples/onnx2xla.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/advi.py
examples/advi.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/kernel_lsq.py
examples/kernel_lsq.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/mnist_classifier.py
examples/mnist_classifier.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/examples_test.py
examples/examples_test.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/spmd_mnist_classifier_fromscratch.py
examples/spmd_mnist_classifier_fromscratch.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/mnist_vae.py
examples/mnist_vae.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/__init__.py
examples/__init__.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/differentially_private_sgd.py
examples/differentially_private_sgd.py
# Copyright 2019 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/mnist_classifier_fromscratch.py
examples/mnist_classifier_fromscratch.py
# Copyright 2018 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/jax_cpp/prog.py
examples/jax_cpp/prog.py
# Copyright 2021 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/src/jax_ffi_example/cuda_examples.py
examples/ffi/src/jax_ffi_example/cuda_examples.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/src/jax_ffi_example/gpu_examples.py
examples/ffi/src/jax_ffi_example/gpu_examples.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/src/jax_ffi_example/cpu_examples.py
examples/ffi/src/jax_ffi_example/cpu_examples.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/src/jax_ffi_example/__init__.py
examples/ffi/src/jax_ffi_example/__init__.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/src/jax_ffi_example/rms_norm.py
examples/ffi/src/jax_ffi_example/rms_norm.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/tests/rms_norm_test.py
examples/ffi/tests/rms_norm_test.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/tests/gpu_examples_test.py
examples/ffi/tests/gpu_examples_test.py
# Copyright 2025 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/tests/cpu_examples_test.py
examples/ffi/tests/cpu_examples_test.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/examples/ffi/tests/cuda_examples_test.py
examples/ffi/tests/cuda_examples_test.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/jax_plugins/rocm/setup.py
jax_plugins/rocm/setup.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/jax_plugins/rocm/plugin_setup.py
jax_plugins/rocm/plugin_setup.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/jax_plugins/rocm/__init__.py
jax_plugins/rocm/__init__.py
# Copyright 2024 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/jax_plugins/cuda/setup.py
jax_plugins/cuda/setup.py
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/jax_plugins/cuda/plugin_setup.py
jax_plugins/cuda/plugin_setup.py
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
jax-ml/jax
https://github.com/jax-ml/jax/blob/78a4304e4d0b6422842efbccfb4f379d347633ea/jax_plugins/cuda/__init__.py
jax_plugins/cuda/__init__.py
# Copyright 2023 The JAX Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
python
Apache-2.0
78a4304e4d0b6422842efbccfb4f379d347633ea
2026-01-04T14:42:24.053813Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/setup.py
setup.py
#!/usr/bin/env python # Copyright (c) OpenMMLab. All rights reserved. import os import os.path as osp import platform import shutil import sys import warnings from setuptools import find_packages, setup import torch from torch.utils.cpp_extension import (BuildExtension, CppExtension, ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/train.py
tools/train.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os import os.path as osp from mmengine.config import Config, DictAction from mmengine.registry import RUNNERS from mmengine.runner import Runner from mmdet.utils import setup_cache_size_limit_of_dynamo def parse_args(): parser = argparse.Arg...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/test_tracking.py
tools/test_tracking.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os import os.path as osp from mmengine.config import Config, DictAction from mmengine.model import is_model_wrapper from mmengine.registry import RUNNERS from mmengine.runner import Runner from mmengine.runner.checkpoint import load_checkpoint fro...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/test.py
tools/test.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os import os.path as osp import warnings from copy import deepcopy from mmengine import ConfigDict from mmengine.config import Config, DictAction from mmengine.runner import Runner from mmdet.engine.hooks.utils import trigger_visualization_hook fr...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/misc/get_crowdhuman_id_hw.py
tools/misc/get_crowdhuman_id_hw.py
# Copyright (c) OpenMMLab. All rights reserved. """Get image shape on CrowdHuman dataset. Here is an example to run this script. Example: python tools/misc/get_crowdhuman_id_hw.py ${CONFIG} \ --dataset ${DATASET_TYPE} """ import argparse import json import logging import os.path as osp from multiprocessing im...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/misc/split_odvg.py
tools/misc/split_odvg.py
import argparse import json import os import shutil import jsonlines import numpy as np from mmengine.utils import ProgressBar, mkdir_or_exist def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('data_root', type=str, help='The data root.') parser.add_argument('ann_file', type=str) ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/misc/get_image_metas.py
tools/misc/get_image_metas.py
# Copyright (c) OpenMMLab. All rights reserved. """Get image metas on a specific dataset. Here is an example to run this script. Example: python tools/misc/get_image_metas.py ${CONFIG} \ --out ${OUTPUT FILE NAME} """ import argparse import csv import os.path as osp from multiprocessing import Pool import mmc...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/misc/print_config.py
tools/misc/print_config.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os from mmengine import Config, DictAction from mmdet.utils import replace_cfg_vals, update_data_root def parse_args(): parser = argparse.ArgumentParser(description='Print the whole config') parser.add_argument('config', help='config fil...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/misc/download_dataset.py
tools/misc/download_dataset.py
import argparse import tarfile from itertools import repeat from multiprocessing.pool import ThreadPool from pathlib import Path from tarfile import TarFile from zipfile import ZipFile import torch from mmengine.utils.path import mkdir_or_exist def parse_args(): parser = argparse.ArgumentParser( descript...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/misc/gen_coco_panoptic_test_info.py
tools/misc/gen_coco_panoptic_test_info.py
import argparse import os.path as osp from mmengine.fileio import dump, load def parse_args(): parser = argparse.ArgumentParser( description='Generate COCO test image information ' 'for COCO panoptic segmentation.') parser.add_argument('data_root', help='Path to COCO annotation directory.') ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/misc/split_coco.py
tools/misc/split_coco.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os.path as osp import numpy as np from mmengine.fileio import dump, load from mmengine.utils import mkdir_or_exist, track_parallel_progress prog_description = '''K-Fold coco split. To split coco data for semi-supervised object detection: pyth...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/ade20k2coco.py
tools/dataset_converters/ade20k2coco.py
import argparse import json import os from pathlib import Path import numpy as np import pycocotools.mask as mask_util from mmengine.utils import ProgressBar, mkdir_or_exist from panopticapi.utils import IdGenerator, save_json from PIL import Image from mmdet.datasets.ade20k import ADE20KPanopticDataset ORIGINAL_CAT...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/crowdhuman2coco.py
tools/dataset_converters/crowdhuman2coco.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import json import os import os.path as osp from collections import defaultdict import mmengine from PIL import Image from tqdm import tqdm def parse_args(): parser = argparse.ArgumentParser( description='CrowdHuman to COCO Video format') ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/lvis2ovd.py
tools/dataset_converters/lvis2ovd.py
import argparse import json import os.path import jsonlines def lvis2ovd(args): ann_path = os.path.join(args.data_root, 'annotations/') lvis = json.load(open(ann_path + 'lvis_v1_val.json')) base_class_ids = [ cat['id'] - 1 for cat in lvis['categories'] if cat['frequency'] != 'r' ] with ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/goldg2odvg.py
tools/dataset_converters/goldg2odvg.py
import argparse import jsonlines from pycocotools.coco import COCO from tqdm import tqdm def _has_only_empty_bbox(anno): return all(any(o <= 1 for o in obj['bbox'][2:]) for obj in anno) def has_valid_annotation(anno): # if it's empty, there is no annotation if len(anno) == 0: return False #...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/youtubevis2coco.py
tools/dataset_converters/youtubevis2coco.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import copy import os import os.path as osp from collections import defaultdict import mmengine from tqdm import tqdm def parse_args(): parser = argparse.ArgumentParser( description='YouTube-VIS to COCO Video format') parser.add_argument...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/pascal_voc.py
tools/dataset_converters/pascal_voc.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os.path as osp import xml.etree.ElementTree as ET import numpy as np from mmengine.fileio import dump, list_from_file from mmengine.utils import mkdir_or_exist, track_progress from mmdet.evaluation import voc_classes label_ids = {name: i for i, n...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/lvis2odvg.py
tools/dataset_converters/lvis2odvg.py
import argparse import json import os.path import jsonlines from lvis import LVIS from tqdm import tqdm key_list_lvis = [i for i in range(1203)] val_list_lvis = [i for i in range(1, 1204)] def dump_lvis_label_map(args): with open(args.input, 'r') as f: j = json.load(f) o_dict = {} for category i...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/grit_processing.py
tools/dataset_converters/grit_processing.py
import argparse import json import logging import os import tarfile from functools import partial from multiprocessing import Pool def create_logger(output_file): logger = logging.getLogger('grit_logger') logger.setLevel(logging.INFO) # set logger output level formatter = logging.Formatter('%(asctime)s -...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/mot2reid.py
tools/dataset_converters/mot2reid.py
# Copyright (c) OpenMMLab. All rights reserved. # This script converts MOT dataset into ReID dataset. # Official website of the MOT dataset: https://motchallenge.net/ # # Label format of MOT dataset: # GTs: # <frame_id> # starts from 1, # <instance_id>, <x1>, <y1>, <w>, <h>, # <conf> # conf is annot...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/coco2ovd.py
tools/dataset_converters/coco2ovd.py
import argparse import json import os.path base_classes = ('person', 'bicycle', 'car', 'motorcycle', 'train', 'truck', 'boat', 'bench', 'bird', 'horse', 'sheep', 'bear', 'zebra', 'giraffe', 'backpack', 'handbag', 'suitcase', 'frisbee', 'skis', 'kite', 'surfboard', 'bottl...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/refcoco2odvg.py
tools/dataset_converters/refcoco2odvg.py
import argparse import os.path as osp import jsonlines from pycocotools.coco import COCO from tqdm import tqdm def parse_args(): parser = argparse.ArgumentParser(description='refcoco to odvg') parser.add_argument('mdetr_anno_dir', type=str) parser.add_argument('--out-dir', '-o', type=str) args = pars...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/coco_stuff164k.py
tools/dataset_converters/coco_stuff164k.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os.path as osp from functools import partial from glob import glob import numpy as np from mmengine.utils import (mkdir_or_exist, track_parallel_progress, track_progress) from PIL import Image COCO_LEN = 123287 clsID_t...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/coco2odvg.py
tools/dataset_converters/coco2odvg.py
import argparse import json import os.path import jsonlines from pycocotools.coco import COCO from tqdm import tqdm id_map = { 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 7, 7: 8, 8: 9, 9: 10, 10: 11, 11: 13, 12: 14, 13: 15, 14: 16, 15: 17, 16: 18, 17...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/extract_coco_from_mixed.py
tools/dataset_converters/extract_coco_from_mixed.py
import argparse import os.path as osp import mmengine from pycocotools.coco import COCO def extract_coco(args): coco = COCO(args.mixed_ann) json_data = mmengine.load(args.mixed_ann) new_json_data = { 'info': json_data['info'], 'licenses': json_data['licenses'], 'categories': json...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/fix_o365_names.py
tools/dataset_converters/fix_o365_names.py
# Reference: https://github.com/shenyunhang/APE/blob/main/datasets/tools/objects3652coco/fix_o365_names.py # noqa import argparse import copy import json if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( '--ann', default='data/objects365v2/annotations/zhiyuan_ob...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/images2coco.py
tools/dataset_converters/images2coco.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os from mmengine.fileio import dump, list_from_file from mmengine.utils import mkdir_or_exist, scandir, track_iter_progress from PIL import Image def parse_args(): parser = argparse.ArgumentParser( description='Convert images to coco ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/prepare_coco_semantic_annos_from_panoptic_annos.py
tools/dataset_converters/prepare_coco_semantic_annos_from_panoptic_annos.py
# Copyright (c) OpenMMLab. All rights reserved. # Modified from https://github.com/facebookresearch/Mask2Former/blob/main/datasets/prepare_coco_semantic_annos_from_panoptic_annos.py # noqa import argparse import functools import json import multiprocessing as mp import os import time import numpy as np from panoptica...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/cityscapes.py
tools/dataset_converters/cityscapes.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import glob import os.path as osp import cityscapesscripts.helpers.labels as CSLabels import mmcv import numpy as np import pycocotools.mask as maskUtils from mmengine.fileio import dump from mmengine.utils import (Timer, mkdir_or_exist, track_parallel_pr...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/remove_cocotrain2017_from_refcoco.py
tools/dataset_converters/remove_cocotrain2017_from_refcoco.py
import argparse import json import os.path as osp import mmengine from pycocotools.coco import COCO def diff_image_id(coco2017_train_ids, ref_ids): set1 = set(coco2017_train_ids) set2 = set(ref_ids) intersection = set1.intersection(set2) result = set1 - intersection return result def gen_new_js...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/grit2odvg.py
tools/dataset_converters/grit2odvg.py
import argparse import json import multiprocessing import os import os.path as osp import emoji import jsonlines from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased') is_debug = False def is_valid_caption(caption, rules={'↙️', '[CLS]', '[SEP]'}): check_anno = capt...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/mot2coco.py
tools/dataset_converters/mot2coco.py
# Copyright (c) OpenMMLab. All rights reserved. # This script converts MOT labels into COCO style. # Official website of the MOT dataset: https://motchallenge.net/ # # Label format of MOT dataset: # GTs: # <frame_id> # starts from 1 but COCO style starts from 0, # <instance_id>, <x1>, <y1>, <w>, <h>, # ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/dataset_converters/openimages2odvg.py
tools/dataset_converters/openimages2odvg.py
import argparse import copy import csv import json import os.path as osp import jsonlines from mmcv.image import imfrombytes from mmengine.fileio import get def _parse_label_file(label_file): index_list = [] classes_names = [] with open(label_file, 'r') as f: reader = csv.reader(f) for li...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/publish_model.py
tools/model_converters/publish_model.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import subprocess import torch from mmengine.logging import print_log from mmengine.utils import digit_version def parse_args(): parser = argparse.ArgumentParser( description='Process a checkpoint to be published') parser.add_argument('i...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/glip_to_mmdet.py
tools/model_converters/glip_to_mmdet.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import subprocess from collections import OrderedDict import torch from mmengine.runner import CheckpointLoader convert_dict_fpn = { 'module.backbone.fpn.fpn_inner2': 'neck.lateral_convs.0.conv', 'module.backbone.fpn.fpn_inner3': 'neck.lateral_co...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/selfsup2mmdet.py
tools/model_converters/selfsup2mmdet.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch def moco_convert(src, dst): """Convert keys in pycls pretrained moco models to mmdet style.""" # load caffe model moco_model = torch.load(src) blobs = moco_model['state_dict'] # conver...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/regnet2mmdet.py
tools/model_converters/regnet2mmdet.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch def convert_stem(model_key, model_weight, state_dict, converted_names): new_key = model_key.replace('stem.conv', 'conv1') new_key = new_key.replace('stem.bn', 'bn1') state_dict[new_key] = mode...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/detectron2_to_mmdet.py
tools/model_converters/detectron2_to_mmdet.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch from mmengine.fileio import load from mmengine.runner import save_checkpoint def convert(src: str, dst: str, prefix: str = 'd2_model') -> None: """Convert Detectron2 checkpoint to MMDetection style. ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/detic_to_mmdet.py
tools/model_converters/detic_to_mmdet.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import subprocess from collections import OrderedDict import torch from mmengine.runner import CheckpointLoader convert_dict_fpn = { 'backbone.fpn_lateral3': 'neck.lateral_convs.0.conv', 'backbone.fpn_lateral4': 'neck.lateral_convs.1.conv', '...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/upgrade_ssd_version.py
tools/model_converters/upgrade_ssd_version.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import tempfile from collections import OrderedDict import torch from mmengine import Config from mmengine.utils import digit_version def parse_config(config_strings): temp_file = tempfile.NamedTemporaryFile() config_path = f'{temp_file.name}.py...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/groundingdino_to_mmdet.py
tools/model_converters/groundingdino_to_mmdet.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import subprocess from collections import OrderedDict import torch from mmengine.runner import CheckpointLoader def correct_unfold_reduction_order(x): out_channel, in_channel = x.shape x = x.reshape(out_channel, 4, in_channel // 4) x = x[:, ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/detectron2pytorch.py
tools/model_converters/detectron2pytorch.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse from collections import OrderedDict import torch from mmengine.fileio import load arch_settings = {50: (3, 4, 6, 3), 101: (3, 4, 23, 3)} def convert_bn(blobs, state_dict, caffe_name, torch_name, converted_names): # detectron replace bn with affine ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/swinv1_to_mmdet.py
tools/model_converters/swinv1_to_mmdet.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import subprocess from collections import OrderedDict import torch from mmengine.runner import CheckpointLoader def swin_converter(ckpt): new_ckpt = OrderedDict() def correct_unfold_reduction_order(x): out_channel, in_channel = x.shape...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tools/model_converters/upgrade_model_version.py
tools/model_converters/upgrade_model_version.py
# Copyright (c) OpenMMLab. All rights reserved. import argparse import re import tempfile from collections import OrderedDict import torch from mmengine import Config def is_head(key): valid_head_list = [ 'bbox_head', 'mask_head', 'semantic_head', 'grid_head', 'mask_iou_head' ] return any(key.st...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false