repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
models | models-master/research/slim/preprocessing/__init__.py | 1 | 0 | 0 | py | |
models | models-master/research/slim/preprocessing/cifarnet_preprocessing.py | # Copyright 2016 The TensorFlow 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 ... | 5,330 | 34.778523 | 80 | py |
models | models-master/research/slim/preprocessing/lenet_preprocessing.py | # Copyright 2016 The TensorFlow 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 ... | 1,804 | 34.392157 | 80 | py |
models | models-master/research/vid2depth/inference.py | # Copyright 2017 The TensorFlow 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 applicab... | 6,027 | 35.981595 | 80 | py |
models | models-master/research/vid2depth/reader.py | # Copyright 2017 The TensorFlow 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 applicab... | 8,847 | 38.324444 | 80 | py |
models | models-master/research/vid2depth/project.py | # Copyright 2017 The TensorFlow 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 applicab... | 11,467 | 36.477124 | 83 | py |
models | models-master/research/vid2depth/model.py | # Copyright 2017 The TensorFlow 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 applicab... | 16,378 | 41.876963 | 80 | py |
models | models-master/research/vid2depth/util.py | # Copyright 2017 The TensorFlow 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 applicab... | 3,698 | 29.319672 | 80 | py |
models | models-master/research/vid2depth/nets.py | # Copyright 2017 The TensorFlow 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 applicab... | 9,845 | 46.336538 | 80 | py |
models | models-master/research/vid2depth/train.py | # Copyright 2017 The TensorFlow 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 applicab... | 6,780 | 37.971264 | 80 | py |
models | models-master/research/vid2depth/dataset/gen_data.py | # Copyright 2017 The TensorFlow 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 applicab... | 7,204 | 35.948718 | 80 | py |
models | models-master/research/vid2depth/dataset/dataset_loader.py | # Copyright 2017 The TensorFlow 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 applicab... | 23,741 | 37.730832 | 124 | py |
models | models-master/research/vid2depth/dataset/__init__.py | # Copyright 2017 The TensorFlow 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 applicab... | 688 | 44.933333 | 80 | py |
models | models-master/research/vid2depth/ops/icp_train_demo.py | # Copyright 2017 The TensorFlow 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 applicab... | 7,596 | 36.423645 | 80 | py |
models | models-master/research/vid2depth/ops/icp_test.py | # Copyright 2017 The TensorFlow 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 applicab... | 10,192 | 41.648536 | 80 | py |
models | models-master/research/vid2depth/ops/icp_grad.py | # Copyright 2017 The TensorFlow 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 applicab... | 1,637 | 32.428571 | 80 | py |
models | models-master/research/vid2depth/ops/icp_util.py | # Copyright 2017 The TensorFlow 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 applicab... | 4,710 | 31.489655 | 80 | py |
models | models-master/research/vid2depth/ops/icp_op.py | # Copyright 2017 The TensorFlow 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 applicab... | 1,078 | 33.806452 | 80 | py |
models | models-master/research/vid2depth/ops/__init__.py | # Copyright 2017 The TensorFlow 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 applicab... | 688 | 44.933333 | 80 | py |
models | models-master/research/vid2depth/ops/icp_grad_test.py | # Copyright 2017 The TensorFlow 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 applicab... | 3,429 | 42.974359 | 80 | py |
models | models-master/research/pcl_rl/objective.py | # Copyright 2017 The TensorFlow 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 applicab... | 13,589 | 36.232877 | 88 | py |
models | models-master/research/pcl_rl/expert_paths.py | # Copyright 2017 The TensorFlow 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 applicab... | 5,095 | 32.090909 | 82 | py |
models | models-master/research/pcl_rl/full_episode_objective.py | # Copyright 2017 The TensorFlow 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 applicab... | 3,050 | 35.321429 | 88 | py |
models | models-master/research/pcl_rl/optimizers.py | # Copyright 2017 The TensorFlow 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 applicab... | 6,346 | 31.055556 | 89 | py |
models | models-master/research/pcl_rl/model.py | # Copyright 2017 The TensorFlow 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 applicab... | 13,144 | 39.198777 | 83 | py |
models | models-master/research/pcl_rl/policy.py | # Copyright 2017 The TensorFlow 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 applicab... | 16,946 | 36.912752 | 87 | py |
models | models-master/research/pcl_rl/trust_region.py | # Copyright 2017 The TensorFlow 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 applicab... | 5,673 | 30.005464 | 83 | py |
models | models-master/research/pcl_rl/gym_wrapper.py | # Copyright 2017 The TensorFlow 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 applicab... | 3,520 | 29.094017 | 80 | py |
models | models-master/research/pcl_rl/controller.py | # Copyright 2017 The TensorFlow 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 applicab... | 16,614 | 34.963203 | 92 | py |
models | models-master/research/pcl_rl/replay_buffer.py | # Copyright 2017 The TensorFlow 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 applicab... | 4,933 | 29.269939 | 80 | py |
models | models-master/research/pcl_rl/baseline.py | # Copyright 2017 The TensorFlow 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 applicab... | 7,292 | 35.833333 | 83 | py |
models | models-master/research/pcl_rl/env_spec.py | # Copyright 2017 The TensorFlow 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 applicab... | 6,024 | 28.975124 | 80 | py |
models | models-master/research/pcl_rl/trainer.py | # Copyright 2017 The TensorFlow 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 applicab... | 18,809 | 38.683544 | 92 | py |
models | models-master/orbit/controller_test.py | # Copyright 2023 The Orbit 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 l... | 31,588 | 35.903037 | 80 | py |
models | models-master/orbit/standard_runner_test.py | # Copyright 2023 The Orbit 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 l... | 5,100 | 32.339869 | 79 | py |
models | models-master/orbit/standard_runner.py | # Copyright 2023 The Orbit 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 l... | 17,402 | 37.587583 | 80 | py |
models | models-master/orbit/runner.py | # Copyright 2023 The Orbit 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 l... | 3,509 | 40.785714 | 113 | py |
models | models-master/orbit/controller.py | # Copyright 2023 The Orbit 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 l... | 24,765 | 41.262799 | 80 | py |
models | models-master/orbit/__init__.py | # Copyright 2023 The Orbit 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 l... | 1,117 | 35.064516 | 74 | py |
models | models-master/orbit/actions/new_best_metric_test.py | # Copyright 2023 The Orbit 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 l... | 4,014 | 41.263158 | 79 | py |
models | models-master/orbit/actions/export_saved_model_test.py | # Copyright 2023 The Orbit 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 l... | 8,521 | 36.707965 | 79 | py |
models | models-master/orbit/actions/save_checkpoint_if_preempted.py | # Copyright 2023 The Orbit 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 l... | 2,319 | 35.825397 | 80 | py |
models | models-master/orbit/actions/export_saved_model.py | # Copyright 2023 The Orbit 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 l... | 5,540 | 35.453947 | 80 | py |
models | models-master/orbit/actions/conditional_action.py | # Copyright 2023 The Orbit 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 l... | 1,978 | 31.442623 | 80 | py |
models | models-master/orbit/actions/conditional_action_test.py | # Copyright 2023 The Orbit 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 l... | 1,325 | 32.15 | 79 | py |
models | models-master/orbit/actions/new_best_metric.py | # Copyright 2023 The Orbit 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 l... | 8,479 | 37.026906 | 80 | py |
models | models-master/orbit/actions/__init__.py | # Copyright 2023 The Orbit 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 l... | 3,327 | 42.220779 | 80 | py |
models | models-master/orbit/examples/__init__.py | # Copyright 2023 The Orbit 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 l... | 604 | 39.333333 | 74 | py |
models | models-master/orbit/examples/single_task/single_task_evaluator.py | # Copyright 2023 The Orbit 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 l... | 3,195 | 35.735632 | 80 | py |
models | models-master/orbit/examples/single_task/__init__.py | # Copyright 2023 The Orbit 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 l... | 604 | 39.333333 | 74 | py |
models | models-master/orbit/examples/single_task/single_task_trainer_test.py | # Copyright 2023 The Orbit 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 l... | 1,961 | 31.163934 | 74 | py |
models | models-master/orbit/examples/single_task/single_task_trainer.py | # Copyright 2023 The Orbit 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 l... | 5,647 | 39.056738 | 80 | py |
models | models-master/orbit/examples/single_task/single_task_evaluator_test.py | # Copyright 2023 The Orbit 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 l... | 2,088 | 30.651515 | 80 | py |
models | models-master/orbit/utils/tpu_summaries_test.py | # Copyright 2023 The Orbit 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 l... | 4,513 | 36.305785 | 83 | py |
models | models-master/orbit/utils/epoch_helper.py | # Copyright 2023 The Orbit 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 l... | 2,136 | 31.378788 | 77 | py |
models | models-master/orbit/utils/tpu_summaries.py | # Copyright 2023 The Orbit 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 l... | 5,631 | 37.575342 | 79 | py |
models | models-master/orbit/utils/common_test.py | # Copyright 2023 The Orbit 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 l... | 1,032 | 28.514286 | 74 | py |
models | models-master/orbit/utils/summary_manager_interface.py | # Copyright 2023 The Orbit 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 l... | 2,253 | 33.676923 | 80 | py |
models | models-master/orbit/utils/common.py | # Copyright 2023 The Orbit 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 l... | 3,913 | 35.924528 | 80 | py |
models | models-master/orbit/utils/__init__.py | # Copyright 2023 The Orbit 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 l... | 1,218 | 38.322581 | 74 | py |
models | models-master/orbit/utils/summary_manager.py | # Copyright 2023 The Orbit 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 l... | 4,277 | 36.858407 | 80 | py |
models | models-master/orbit/utils/loop_fns.py | # Copyright 2023 The Orbit 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 l... | 8,016 | 37.543269 | 80 | py |
models | models-master/tensorflow_models/tensorflow_models_test.py | # Copyright 2023 The TensorFlow 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 applica... | 1,385 | 32.804878 | 77 | py |
models | models-master/tensorflow_models/__init__.py | # Copyright 2023 The TensorFlow 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 applica... | 909 | 36.916667 | 74 | py |
models | models-master/tensorflow_models/nlp/__init__.py | # Copyright 2023 The TensorFlow 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 applica... | 807 | 37.47619 | 74 | py |
models | models-master/tensorflow_models/vision/__init__.py | # Copyright 2023 The TensorFlow 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 applica... | 833 | 36.909091 | 74 | py |
cyphercat | cyphercat-master/setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import sys
from shutil import rmtree
from setuptools import setup, find_packages, Command
NAME = 'cyphercat'
DESCRIPTION = 'A toolkit for ML security',
MAINTAINER = 'lab41'
MAINTAINER_EMAIL = 'info@lab41.org'
URL = 'https://github.com/Lab41/cyphercat'
... | 3,163 | 26.754386 | 87 | py |
cyphercat | cyphercat-master/Classification_baselines/LibriSpeech/LS_UTILS/Network_funcs.py | import os
import numpy as np
import soundfile as sf # To read .flac files.
import librosa
# For the neural network.
# Install PyBrain, e.g. pip install pybrain.
from pybrain.datasets import ClassificationDataSet
from pybrain.tools.shortcuts import buildNetwork
from pybrain.supervised... | 6,501 | 35.734463 | 129 | py |
cyphercat | cyphercat-master/Classification_baselines/LibriSpeech/LS_UTILS/Data_load.py | import os
from os import path, makedirs
# For LibriSpeech download
import codecs
import fnmatch
import requests
import subprocess
import tarfile
import unicodedata
from tensorflow.python.platform import gfile
# Processing
split_and_df = False #True if you haven't already done this step
def maybe_download(archive_... | 7,310 | 44.409938 | 108 | py |
cyphercat | cyphercat-master/Classification_baselines/LibriSpeech/LS_UTILS/Move_data.py | import os
def move_files(abs_dirname,speaker,datapath,trainSet,cvSet,tstSet):
"""Move files into subdirectories."""
for subdir in os.listdir(abs_dirname):
files = [os.path.join(abs_dirname,subdir, f) for f in os.listdir(os.path.join(abs_dirname,subdir))]
cv_dir = os.path.abspath(os.path.join... | 1,889 | 33.363636 | 109 | py |
cyphercat | cyphercat-master/scripts/test_train.py | from __future__ import print_function
try:
import os
import sys
import argparse
import numpy as np
import matplotlib.pyplot as plt
import torch
import torchvision
import torch.nn as nn
import torch.optim as optim
from cyphercat.models import get_predef_model, weight... | 4,030 | 32.31405 | 116 | py |
cyphercat | cyphercat-master/scripts/test_load.py | from __future__ import print_function
try:
import time
import os
import sys
import argparse
import torch
from cyphercat.load_data import prep_data
from cyphercat.utils import Configurator, DataStruct
except ImportError as e:
print(e)
raise ImportError
def main():
global... | 1,500 | 26.290909 | 163 | py |
cyphercat | cyphercat-master/scripts/test_train_libri.py | from __future__ import print_function
try:
import os
import sys
import argparse
import numpy as np
import matplotlib.pyplot as plt
import torch
import torchvision
import torch.nn as nn
import torch.optim as optim
from cyphercat.models import get_predef_model, weight... | 3,781 | 33.697248 | 124 | py |
cyphercat | cyphercat-master/Visualizations/visualize_util.py | from graphviz import Digraph
def visualize(model, name):
print(model.source) # doctest: +NORMALIZE_WHITESPACE
model.render(name, view=False) # doctest: +SKIP
#name.pdf
# print(fool_attack.source) # doctest: +NORMALIZE_WHITESPACE
# fool_attack.render('test-output/fooling_attack-table.gv', view=False... | 990 | 44.045455 | 98 | py |
cyphercat | cyphercat-master/Visualizations/model_fooling.py | from graphviz import Digraph
# MODEL FOOLING
def fooling_attack():
fool_attack = Digraph('Fooling Attacks',graph_attr={'size':'8.5,11.5'},comment='Taxonomy of Secure Deep Learning', )
fool_attack #doctest: +ELLIPSIS
# NODES:
fool_attack.node('Fooling Attacks', r'{<f0> Fooling Attacks |<f1>... | 2,500 | 43.660714 | 120 | py |
cyphercat | cyphercat-master/Visualizations/visualize.py | from graphviz import Digraph
from model_inversion import *
from model_fooling import *
from visualize_util import *
# Generate the PDF's
visualize(fooling_attack(), 'fooling_attack.gv')
visualize(fooling_defense(), 'fooling_defense.gv')
visualize(inversion_attack(), 'inversion_attack.gv')
visualize(inversion_defense()... | 346 | 30.545455 | 54 | py |
cyphercat | cyphercat-master/Visualizations/model_inversion.py | from graphviz import Digraph
# MODEL INVERSION
def inversion_attack():
inversion_attack = Digraph('Inversion Attacks',comment='Taxonomy of Secure Deep Learning')
inversion_attack.node('Inversion Attacks', r'{<f0> Inversion Attacks |<f1> '+
r'https://arxiv.org/abs/1804.00097'+
... | 1,812 | 45.487179 | 96 | py |
cyphercat | cyphercat-master/Utils/transformations.py | import torch
import librosa as libr
import numpy as np
class ToMFCC:
'''
Transformation to convert soundfile loaded via LibriSpeechDataset to Mel-
frequency cepstral coefficients (MFCCs)
Args:
number_of_mels: Number of bins to use for cepstral coefficients
Returns:
torch.float tensor
... | 1,449 | 28.591837 | 79 | py |
cyphercat | cyphercat-master/Utils/datasets.py | from torch.utils.data import Dataset
from tqdm import tqdm
import soundfile as sf
import pandas as pd
import numpy as np
import os
LIBRISPEECH_SAMPLING_RATE = 16000
PATH = '/home/mlomnitz/mlomnitz/Datasets'
sex_to_label = {'M': False, 'F': True}
label_to_sex = {False: 'M', True: 'F'}
def to_categorical(y, num_classe... | 18,446 | 38.082627 | 119 | py |
cyphercat | cyphercat-master/Utils/visualize_object_survey.py | #!/usr/bin/python3
"""
Set of functions used to call a series of algorithms used to visualize the object localization of a pre-trained
network in PyTorch. The different algorithms are discussed in several papers, while the implementation is based,
roughly, on work in the following repository (https://github.com/sar-... | 8,615 | 31.513208 | 117 | py |
cyphercat | cyphercat-master/Utils/models.py | import torch
from torch import nn
import torch.nn.functional as F
import numpy as np
import os.path
def new_size_conv(size, kernel, stride=1, padding=0):
return np.floor((size + 2*padding - (kernel -1)-1)/stride +1)
def new_size_max_pool(size, kernel, stride=None, padding=0):
if stride == None:
... | 14,560 | 32.018141 | 128 | py |
cyphercat | cyphercat-master/Utils/metrics.py | import torch
import torch.nn.functional as F
import numpy as np
import matplotlib.pyplot as plt
from sklearn.pipeline import Pipeline
from SVC_Utils import *
from sklearn.metrics import roc_curve, auc
# determine device to run network on (runs on gpu if available)
device = torch.device("cuda:0" if torch.cuda.is_avail... | 11,084 | 35.22549 | 134 | py |
cyphercat | cyphercat-master/Utils/SVC_Utils.py | import numpy as np
import matplotlib.pyplot as plt
import os
from sklearn import svm
from sklearn.decomposition import PCA
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import MinMaxScaler
from sklearn.externals import joblib
import torch
import torchvision
def load(dataloader):
"""Load... | 3,655 | 30.791304 | 116 | py |
cyphercat | cyphercat-master/Utils/data_downloaders.py | import os, shutil
import urllib.request
import zipfile
import tarfile
# For LibriSpeech download
import codecs
import fnmatch
import requests
import subprocess
import unicodedata
from tensorflow.python.platform import gfile
def get_tiny_imagenet(datasets_dir):
if os.path.isdir(os.path.join(datasets_dir,'ti... | 9,016 | 38.034632 | 124 | py |
cyphercat | cyphercat-master/Utils/train.py | import torch
import torch.nn.functional as F
import numpy as np
import matplotlib.pyplot as plt
from metrics import *
# determine device to run network on (runs on gpu if available)
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
def train(net, data_loader, test_loader, optimizer, criterion... | 8,087 | 35.432432 | 142 | py |
cyphercat | cyphercat-master/cyphercat/definitions.py | import os
# Local directory of CypherCat API
CYCAT_DIR = os.path.dirname(os.path.abspath(__file__))
# Local directory containing entire repo
REPO_DIR = os.path.split(CYCAT_DIR)[0]
# Local directory for datasets
DATASETS_DIR = os.path.join(REPO_DIR, 'Datasets')
# Local directory for datasets
DATASPLITS_DIR = os.path... | 350 | 24.071429 | 54 | py |
cyphercat | cyphercat-master/cyphercat/__version__.py |
__version__ = '0.1.dev0'
| 26 | 8 | 24 | py |
cyphercat | cyphercat-master/cyphercat/defenses.py | import copy
# Torch imports
import torch
import torch.optim as optim
# Local imports
from .train import train, softCrossEntropy
from .metrics import eval_target_model
def transfer_learn(model=None, data_loader=None, test_loader=None,
optimizer=None, criterion=None, lr=0, n_epochs=0,
... | 6,149 | 37.198758 | 78 | py |
cyphercat | cyphercat-master/cyphercat/models.py | import os
import torch
import numpy as np
from torch import nn
import torch.nn.functional as fcnal
def new_size_conv(size, kernel, stride=1, padding=0):
"""Calculates the output size of a convolutional layer
Args:
size (int): Size of input (assumed square).
kernel (int): kernel size for conv... | 14,856 | 31.509847 | 79 | py |
cyphercat | cyphercat-master/cyphercat/metrics.py | import torch
import torch.nn.functional as fcnal
import numpy as np
import pandas as pd
from sklearn.pipeline import Pipeline
# determine device to run network on (runs on gpu if available)
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
def eval_target_model(model=None, data_loader=None, c... | 9,273 | 33.221402 | 78 | py |
cyphercat | cyphercat-master/cyphercat/load_data.py | import os
from .utils.file_utils import downloader, unpacker
def prep_data(data_struct=None):
"""
Function to prepare data set
based on input configuration
Parameters
----------
data_struct : config structure
parameters from 'data' field
of global yaml ... | 2,903 | 32.37931 | 76 | py |
cyphercat | cyphercat-master/cyphercat/__init__.py | # __init__.py
from .__version__ import __version__
from .utils import *
from .train import *
from .models import *
from .metrics import *
from .attacks import *
from .datadefs import *
from .defenses import *
from .load_data import *
from .definitions import *
from .datadefs.libri_dataset import *
from .datadefs.voic... | 339 | 21.666667 | 38 | py |
cyphercat | cyphercat-master/cyphercat/train.py |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as fcnal
from sklearn.pipeline import Pipeline
from .metrics import eval_target_model
# Determine device to run network on (runs on gpu if available)
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
def label_t... | 15,691 | 35.749415 | 79 | py |
cyphercat | cyphercat-master/cyphercat/attacks.py | # Pytorch imports
import torch
# Cyphercat imports
from .train import train, train_attacker
from .metrics import eval_membership_inference, eval_attack_model
# Device to run on
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
def ml_leaks1(target=None, shadow_model=None, attacker_model=None,
... | 5,614 | 40.286765 | 79 | py |
cyphercat | cyphercat-master/cyphercat/datadefs/lfw_dataset.py | import os
import shutil
import numpy as np
from skimage import io
from torch.utils.data.dataset import Dataset
class LFWDataset(Dataset):
"""
Faces in the Wild specific dataset class.
Includes indexing functionality.
Inherets from PyTorch Dataset class.
"""
def __init__(self, data_struct=None... | 2,692 | 27.956989 | 79 | py |
cyphercat | cyphercat-master/cyphercat/datadefs/cyphercat_dataset.py | from cyphercat.definitions import DATASETS_DIR, DATASPLITS_DIR
from .cifar10_dataset import Cifar10_preload_and_split
from .libri_dataset import Libri_preload_and_split
class CCATDataset():
"""
This is a generic cyphercat dataset class for accessing the various
datasets accessible to the package.
# A... | 2,715 | 33.820513 | 93 | py |
cyphercat | cyphercat-master/cyphercat/datadefs/cifar10_dataset.py | import torch
from torch.utils.data import Dataset, ConcatDataset
import torchvision
from cyphercat.definitions import DATASETS_DIR, DATASPLITS_DIR
from tqdm import tqdm
import pandas as pd
import numpy as np
import pickle
import os
from .splitter import splitter, dataset_split
def Cifar10_preload_and_split(path=None,... | 2,161 | 31.757576 | 105 | py |
cyphercat | cyphercat-master/cyphercat/datadefs/splitter.py | from torch import randperm
from torch._utils import _accumulate
from torch.utils.data.dataset import Subset
import pandas as pd
def dataset_split(dataset=None, lengths=None, indices=None):
"""
Split a dataset into non-overlapping new datasets of given lengths.
If indices is undefined, then a random permu... | 7,516 | 35.848039 | 79 | py |
cyphercat | cyphercat-master/cyphercat/datadefs/voices_dataset.py | from torch.utils.data import Dataset
from cyphercat.definitions import DATASETS_DIR, DATASPLITS_DIR
from tqdm import tqdm
import soundfile as sf
import pandas as pd
import numpy as np
import os
from .splitter import splitter, splitter2
LIBRISPEECH_SAMPLING_RATE = 16000
sex_to_label = {'M': False, 'F': True}
label_to_... | 24,898 | 38.966292 | 80 | py |
cyphercat | cyphercat-master/cyphercat/datadefs/libri_dataset.py | from torch.utils.data import Dataset
from cyphercat.definitions import DATASETS_DIR, DATASPLITS_DIR
from tqdm import tqdm
import soundfile as sf
import pandas as pd
import numpy as np
import os
from .splitter import splitter
LIBRISPEECH_SAMPLING_RATE = 16000
sex_to_label = {'M': False, 'F': True}
label_to_sex = {Fals... | 21,505 | 39.96381 | 80 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.