text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: tests/base/halton_deterministic_sampling.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2019, Robert Bosch GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modificat... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/base/halton_deterministic_sampling.cpp", "license": "bsd", "size": 5506} |
### File: tests/base/planner_data.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2012, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/base/planner_data.cpp", "license": "bsd", "size": 21828} |
### File: tests/base/ptc.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2013, Willow Garage
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/base/ptc.cpp", "license": "bsd", "size": 6370} |
### File: tests/base/state_operations.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permit... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/base/state_operations.cpp", "license": "bsd", "size": 10307} |
### File: tests/base/state_spaces.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are per... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/base/state_spaces.cpp", "license": "bsd", "size": 20293} |
### File: tests/base/state_storage.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2012, Willow Garage
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/base/state_storage.cpp", "license": "bsd", "size": 3592} |
### File: tests/benchmark/machine_specs.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, ar... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/benchmark/machine_specs.cpp", "license": "bsd", "size": 2621} |
### File: tests/control/2dmap/2dmap.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/control/2dmap/2dmap.cpp", "license": "bsd", "size": 18994} |
### File: tests/control/planner_data.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2012, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitt... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/control/planner_data.cpp", "license": "bsd", "size": 23255} |
### File: tests/datastructures/adjacency_list.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2015, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, ar... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/datastructures/adjacency_list.cpp", "license": "bsd", "size": 14189} |
### File: tests/datastructures/grid.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/datastructures/grid.cpp", "license": "bsd", "size": 6291} |
### File: tests/datastructures/gridb.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are per... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/datastructures/gridb.cpp", "license": "bsd", "size": 4869} |
### File: tests/datastructures/heap.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/datastructures/heap.cpp", "license": "bsd", "size": 3103} |
### File: tests/datastructures/nearestneighbors.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/datastructures/nearestneighbors.cpp", "license": "bsd", "size": 11749} |
### File: tests/datastructures/pdf.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2011, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/datastructures/pdf.cpp", "license": "bsd", "size": 5859} |
### File: tests/extensions/morse/morse_plan.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/extensions/morse/morse_plan.cpp", "license": "bsd", "size": 5311} |
### File: tests/geometric/2d/2DcirclesSetup.h
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2013, Willow Garage
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2DcirclesSetup.h", "license": "bsd", "size": 5058} |
### File: tests/geometric/2d/2DmapSetup.h
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permit... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2DmapSetup.h", "license": "bsd", "size": 9489} |
### File: tests/geometric/2d/2DmapSetup1.h
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2DmapSetup1.h", "license": "bsd", "size": 6294} |
### File: tests/geometric/2d/2dcircles_optimize.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2013, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modificati... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2dcircles_optimize.cpp", "license": "bsd", "size": 14941} |
### File: tests/geometric/2d/2denvs.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2denvs.cpp", "license": "bsd", "size": 23760} |
### File: tests/geometric/2d/2dmap_ik.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permit... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2dmap_ik.cpp", "license": "bsd", "size": 3622} |
### File: tests/geometric/2d/2dmap_simple.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, ar... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2dmap_simple.cpp", "license": "bsd", "size": 6081} |
### File: tests/geometric/2d/2dpath_simplifying.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2018, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modificati... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/2d/2dpath_simplifying.cpp", "license": "bsd", "size": 7685} |
### File: tests/geometric/constraint/test_sphere.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* mo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/geometric/constraint/test_sphere.cpp", "license": "bsd", "size": 13891} |
### File: tests/regression_tests/CMakeLists.txt
add_executable(regression_test RegressionTest.cpp)
target_link_libraries(regression_test
ompl
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${Boost_DATE_TIME_LIBRARY})
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/ompl", "path": "tests/regression_tests/CMakeLists.txt", "license": "bsd", "size": 218} |
### File: tests/regression_tests/RegressionTest.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2014, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/regression_tests/RegressionTest.cpp", "license": "bsd", "size": 5990} |
### File: tests/regression_tests/RegressionTestCirclesProblem.inl.h
static const unsigned int CIRCLES_ID = 1;
template<>
std::string problemName<CIRCLES_ID>() { return "circles"; }
// Setup for the Circles problem, part of the OMPL test suite.
static std::shared_ptr<geometric::SimpleSetup> setupCirclesProblem(unsign... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/regression_tests/RegressionTestCirclesProblem.inl.h", "license": "bsd", "size": 4339} |
### File: tests/regression_tests/regression_test.sh
#!/bin/bash
if [ ! -e tests/regression_tests/ ] ; then
echo "Need to run this from the OMPL root source dir."
exit
fi
TAGS=`cat tests/regression_tests/VERSIONS`
NPROC=`(nproc || sysctl -n hw.ncpu || echo 4) 2>/dev/null`
GIT_REPO=https://github.com/ompl/omp... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/ompl", "path": "tests/regression_tests/regression_test.sh", "license": "bsd", "size": 1151} |
### File: tests/resources/circles2D.h
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2013, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permit... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/resources/circles2D.h", "license": "bsd", "size": 9859} |
### File: tests/resources/environment2D.h
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are pe... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/resources/environment2D.h", "license": "bsd", "size": 4070} |
### File: tests/resources/haltonXD.h
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2019, Robert Bosch GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/resources/haltonXD.h", "license": "bsd", "size": 3072} |
### File: tests/test_loop.sh
#!/bin/bash
control_c()
# run if user hits control-c
{
echo -en "\n*** User requested termination ***\n"
exit 1
}
# This script simply runs a test many times in gdb
TEST_EXE=../build/bin/test_2denvs_geometric
COUNT=100
if [ $# -gt 0 ]
then
COUNT=$1
fi
USE_GDB=false
if [ $# -gt 1... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/ompl", "path": "tests/test_loop.sh", "license": "bsd", "size": 847} |
### File: tests/test_results.sh
#!/bin/bash
# The typical use will be watch ./test_results.sh
echo
echo -n "Set of return codes so far: [ "
cat ompl_run_test_codes | sort | uniq | tr "\\n" " "
echo "]"
cat ompl_run_test_count && cat ompl_run_test_codes | perl -e 'print reverse <>'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/ompl", "path": "tests/test_results.sh", "license": "bsd", "size": 251} |
### File: tests/util/random/random.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, ar... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/util/random/random.cpp", "license": "bsd", "size": 13103} |
### File: tests/util/test_py_std_function.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are pe... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/ompl", "path": "tests/util/test_py_std_function.cpp", "license": "bsd", "size": 3660} |
### File: CMakeLists.txt
cmake_minimum_required(VERSION 3.18)
project(torchvision)
set(CMAKE_CXX_STANDARD 17)
file(STRINGS version.txt TORCHVISION_VERSION)
option(WITH_CUDA "Enable CUDA support" OFF)
option(WITH_MPS "Enable MPS support" OFF)
option(WITH_PNG "Enable features requiring LibPNG." ON)
option(WITH_JPEG "Ena... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pytorch-vision", "path": "CMakeLists.txt", "license": "bsd-3-clause", "size": 4741} |
### File: android/ops/CMakeLists.txt
cmake_minimum_required(VERSION 3.4.1)
set(TARGET torchvision_ops)
project(${TARGET} CXX)
set(CMAKE_CXX_STANDARD 17)
string(APPEND CMAKE_CXX_FLAGS " -DMOBILE")
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
set(root_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
file(GLOB VISION_SRCS
../../torch... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pytorch-vision", "path": "android/ops/CMakeLists.txt", "license": "bsd-3-clause", "size": 1204} |
### File: android/test_app/app/src/main/java/org/pytorch/testapp/BBox.java
package org.pytorch.testapp;
class BBox {
public final float score;
public final float x0;
public final float y0;
public final float x1;
public final float y1;
public BBox(float score, float x0, float y0, float x1, float y1) {
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Java", "repo_name": "minhanghuang/pytorch-vision", "path": "android/test_app/app/src/main/java/org/pytorch/testapp/BBox.java", "license": "bsd-3-clause", "size": 478} |
### File: android/test_app/app/src/main/java/org/pytorch/testapp/CameraActivity.java
package org.pytorch.testapp;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import andr... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Java", "repo_name": "minhanghuang/pytorch-vision", "path": "android/test_app/app/src/main/java/org/pytorch/testapp/CameraActivity.java", "license": "bsd-3-clause", "siz... |
### File: android/test_app/app/src/main/java/org/pytorch/testapp/MainActivity.java
package org.pytorch.testapp;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.SystemClock;
import android.util.Log;
import android.widget.TextView;
import androidx.annotation.Nullab... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Java", "repo_name": "minhanghuang/pytorch-vision", "path": "android/test_app/app/src/main/java/org/pytorch/testapp/MainActivity.java", "license": "bsd-3-clause", "size"... |
### File: android/test_app/app/src/main/java/org/pytorch/testapp/Result.java
package org.pytorch.testapp;
import java.util.List;
class Result {
public final int tensorSize;
public final List<BBox> bboxes;
public final long totalDuration;
public final long moduleForwardDuration;
public Result(int tensorSize... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Java", "repo_name": "minhanghuang/pytorch-vision", "path": "android/test_app/app/src/main/java/org/pytorch/testapp/Result.java", "license": "bsd-3-clause", "size": 476} |
### File: cmake/TorchVisionConfig.cmake.in
# TorchVisionConfig.cmake
# --------------------
#
# Exported targets:: Vision
#
@PACKAGE_INIT@
set(PN TorchVision)
# location of include/torchvision
set(${PN}_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
set(${PN}_LIBRARY "")
set(${PN}_DEFINITIONS USING... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pytorch-vision", "path": "cmake/TorchVisionConfig.cmake.in", "license": "bsd-3-clause", "size": 1592} |
### File: cmake/iOS.cmake
# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake
# files which are included with CMake 2.8.4
# It has been altered for iOS development
# Options:
#
# IOS_PLATFORM = OS (default) or SIMULATOR
# This decides if SDKS will be selected from the iPhoneOS.platform... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pytorch-vision", "path": "cmake/iOS.cmake", "license": "bsd-3-clause", "size": 9538} |
### File: docs/Makefile
# Minimal makefile for Sphinx documentation
#
ifneq ($(EXAMPLES_PATTERN),)
EXAMPLES_PATTERN_OPTS := -D sphinx_gallery_conf.filename_pattern="$(EXAMPLES_PATTERN)"
endif
# You can set these variables from the command line.
SPHINXOPTS = -W -j auto $(EXAMPLES_PATTERN_OPTS)
SPHINXBUILD = s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/pytorch-vision", "path": "docs/Makefile", "license": "bsd-3-clause", "size": 1668} |
### File: docs/make.bat
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=torchvision
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build'... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pytorch-vision", "path": "docs/make.bat", "license": "bsd-3-clause", "size": 783} |
### File: docs/source/_static/css/custom_torchvision.css
/* This rule should be removed once
https://github.com/pytorch/pytorch_sphinx_theme/issues/125 is fixed.
We override the rule so that the links to the notebooks aren't hidden in the
gallery examples. pytorch_sphinx_theme is supposed to customize those links so
t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CSS", "repo_name": "minhanghuang/pytorch-vision", "path": "docs/source/_static/css/custom_torchvision.css", "license": "bsd-3-clause", "size": 1318} |
### File: docs/source/_templates/layout.html
{% extends "!layout.html" %}
{% block sidebartitle %}
<div class="version">
<a href='https://pytorch.org/vision/versions.html'>{{ version }} ▼</a>
</div>
{% include "searchbox.html" %}
{% endblock %}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/pytorch-vision", "path": "docs/source/_templates/layout.html", "license": "bsd-3-clause", "size": 225} |
### File: docs/source/beta_status.py
from docutils import nodes
from docutils.parsers.rst import Directive
class BetaStatus(Directive):
has_content = True
text = "The {api_name} is in Beta stage, and backward compatibility is not guaranteed."
node = nodes.warning
def run(self):
text = self.te... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "docs/source/beta_status.py", "license": "bsd-3-clause", "size": 992} |
### File: examples/cpp/hello_world/CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(hello-world)
# The first thing do is to tell cmake to find the TorchVision library.
# The package pulls in all the necessary torch libraries,
# so there is no need to also add `find_package(Torch)` here.
find_package(TorchVi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pytorch-vision", "path": "examples/cpp/hello_world/CMakeLists.txt", "license": "bsd-3-clause", "size": 829} |
### File: examples/cpp/hello_world/main.cpp
#include <iostream>
#include <torch/script.h>
#include <torch/torch.h>
#include <torchvision/vision.h>
int main() {
torch::DeviceType device_type;
device_type = torch::kCPU;
torch::jit::script::Module model;
try {
std::cout << "Loading model\n";
// Deseriali... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/pytorch-vision", "path": "examples/cpp/hello_world/main.cpp", "license": "bsd-3-clause", "size": 1258} |
### File: examples/cpp/hello_world/trace_model.py
import os.path as osp
import torch
import torchvision
HERE = osp.dirname(osp.abspath(__file__))
ASSETS = osp.dirname(osp.dirname(HERE))
model = torchvision.models.resnet18()
model.eval()
traced_model = torch.jit.script(model)
traced_model.save("resnet18.pt")
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "examples/cpp/hello_world/trace_model.py", "license": "bsd-3-clause", "size": 263} |
### File: gallery/others/plot_optical_flow.py
"""
=====================================================
Optical Flow: Predicting movement with the RAFT model
=====================================================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_g... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/others/plot_optical_flow.py", "license": "bsd-3-clause", "size": 8277} |
### File: gallery/others/plot_repurposing_annotations.py
"""
=====================================
Repurposing masks into bounding boxes
=====================================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_repurpo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/others/plot_repurposing_annotations.py", "license": "bsd-3-clause", "size": 7507} |
### File: gallery/others/plot_scripted_tensor_transforms.py
"""
===================
Torchscript support
===================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_scripted_tensor_transforms.ipynb>`_
or :ref:`go to the... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/others/plot_scripted_tensor_transforms.py", "license": "bsd-3-clause", "size": 4285} |
### File: gallery/others/plot_video_api.py
"""
=========
Video API
=========
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_video_api.ipynb>`_
or :ref:`go to the end <sphx_glr_download_auto_examples_others_plot_video_api.py>`... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/others/plot_video_api.py", "license": "bsd-3-clause", "size": 11742} |
### File: gallery/others/plot_visualization_utils.py
"""
=======================
Visualization utilities
=======================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_visualization_utils.ipynb>`_
or :ref:`go to the e... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/others/plot_visualization_utils.py", "license": "bsd-3-clause", "size": 17156} |
### File: gallery/transforms/helpers.py
import matplotlib.pyplot as plt
import torch
from torchvision.utils import draw_bounding_boxes, draw_segmentation_masks
from torchvision import tv_tensors
from torchvision.transforms.v2 import functional as F
def plot(imgs, row_title=None, **imshow_kwargs):
if not isinstanc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/helpers.py", "license": "bsd-3-clause", "size": 2022} |
### File: gallery/transforms/plot_custom_transforms.py
"""
===================================
How to write your own v2 transforms
===================================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_custom_transfor... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/plot_custom_transforms.py", "license": "bsd-3-clause", "size": 4823} |
### File: gallery/transforms/plot_custom_tv_tensors.py
"""
====================================
How to write your own TVTensor class
====================================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_custom_tv_te... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/plot_custom_tv_tensors.py", "license": "bsd-3-clause", "size": 4697} |
### File: gallery/transforms/plot_cutmix_mixup.py
"""
===========================
How to use CutMix and MixUp
===========================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_cutmix_mixup.ipynb>`_
or :ref:`go to th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/plot_cutmix_mixup.py", "license": "bsd-3-clause", "size": 5103} |
### File: gallery/transforms/plot_transforms_e2e.py
"""
===============================================================
Transforms v2: End-to-end object detection/segmentation example
===============================================================
.. note::
Try on `collab <https://colab.research.google.com/github/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/plot_transforms_e2e.py", "license": "bsd-3-clause", "size": 7047} |
### File: gallery/transforms/plot_transforms_getting_started.py
"""
==================================
Getting started with transforms v2
==================================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_transform... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/plot_transforms_getting_started.py", "license": "bsd-3-clause", "size": 10279} |
### File: gallery/transforms/plot_transforms_illustrations.py
"""
==========================
Illustration of transforms
==========================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_transforms_illustrations.ipynb>`_
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/plot_transforms_illustrations.py", "license": "bsd-3-clause", "size": 11991} |
### File: gallery/transforms/plot_tv_tensors.py
"""
=============
TVTensors FAQ
=============
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_tv_tensors.ipynb>`_
or :ref:`go to the end <sphx_glr_download_auto_examples_transfor... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "gallery/transforms/plot_tv_tensors.py", "license": "bsd-3-clause", "size": 7935} |
### File: hubconf.py
# Optional list of dependencies required by the package
dependencies = ["torch"]
from torchvision.models import get_model_weights, get_weight
from torchvision.models.alexnet import alexnet
from torchvision.models.convnext import convnext_base, convnext_large, convnext_small, convnext_tiny
from tor... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "hubconf.py", "license": "bsd-3-clause", "size": 2549} |
### File: ios/CMakeLists.txt
cmake_minimum_required(VERSION 3.4.1)
set(TARGET torchvision_ops)
project(${TARGET} CXX)
set(CMAKE_CXX_STANDARD 17)
set(LIBTORCH_HEADER_ROOT ${LIBTORCH_HEADER_ROOT})
set(LIBRARY_OUTPUT_PATH ../lib)
file(GLOB VISION_SRCS
../torchvision/csrc/ops/cpu/*.h
../torchvision/csrc/ops/cpu/*.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/CMakeLists.txt", "license": "bsd-3-clause", "size": 640} |
### File: ios/LibTorchvision.podspec
pytorch_version = '2.0.0'
Pod::Spec.new do |s|
s.name = 'LibTorchvision'
s.version = '0.15.1'
s.authors = 'PyTorch Team'
s.license = { :type => 'BSD' }
s.homepage = 'https://github.com/pytorch/vision'
s.source ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Ruby", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/LibTorchvision.podspec", "license": "bsd-3-clause", "size": 1085} |
### File: ios/VisionTestApp/VisionTestApp/AppDelegate.h
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property(strong, nonatomic) UIWindow *window;
@end
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/VisionTestApp/AppDelegate.h", "license": "bsd-3-clause", "size": 140} |
### File: ios/VisionTestApp/VisionTestApp/AppDelegate.m
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/VisionTestApp/AppDelegate.m", "license": "bsd-3-clause", "size": 1906} |
### File: ios/VisionTestApp/VisionTestApp/ModelRunner.h
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ModelRunner : NSObject
+ (NSString* )run;
+ (BOOL)setUp;
@end
NS_ASSUME_NONNULL_END
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/VisionTestApp/ModelRunner.h", "license": "bsd-3-clause", "size": 159} |
### File: ios/VisionTestApp/VisionTestApp/ModelRunner.mm
#import "ModelRunner.h"
#include <string>
#include <vector>
#include "ATen/ATen.h"
#include "caffe2/core/timer.h"
#include "caffe2/utils/string_utils.h"
#include "torch/csrc/autograd/grad_mode.h"
#include "torch/csrc/jit/serialization/import.h"
#include "torch/s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C++", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/VisionTestApp/ModelRunner.mm", "license": "bsd-3-clause", "size": 2282} |
### File: ios/VisionTestApp/VisionTestApp/ViewController.h
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/VisionTestApp/ViewController.h", "license": "bsd-3-clause", "size": 78} |
### File: ios/VisionTestApp/VisionTestApp/ViewController.mm
#import "ViewController.h"
#include <torch/script.h>
#import "ModelRunner.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UITextView *textView;
@end
static NSString const *config_error_msg = @"Wrong model configurations... Please fix an... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C++", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/VisionTestApp/ViewController.mm", "license": "bsd-3-clause", "size": 1002} |
### File: ios/VisionTestApp/VisionTestApp/main.m
//
// main.m
// VisionTestApp
//
// Created by Yuchen Huang on 3/31/21.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
NSString * appDelegateClassName;
@autoreleasepool {
// Setup code that might create autoreleased ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Objective-C", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/VisionTestApp/main.m", "license": "bsd-3-clause", "size": 432} |
### File: ios/VisionTestApp/clean.sh
#!/bin/bash
set -ex -o pipefail
TEST_APP_PATH=$(dirname $(realpath $0))
cd ${TEST_APP_PATH}
rm -rf ./install
rm ./VisionTestApp/*.pt
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/clean.sh", "license": "bsd-3-clause", "size": 135} |
### File: ios/VisionTestApp/make_assets.py
import torch
from torch.utils.mobile_optimizer import optimize_for_mobile
from torchvision.models.detection import (
fasterrcnn_mobilenet_v3_large_320_fpn,
FasterRCNN_MobileNet_V3_Large_320_FPN_Weights,
)
print(torch.__version__)
model = fasterrcnn_mobilenet_v3_large... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/make_assets.py", "license": "bsd-3-clause", "size": 634} |
### File: ios/VisionTestApp/setup.sh
#!/bin/bash
set -ex -o pipefail
echo ""
echo "DIR: $(pwd)"
TEST_APP_PATH=$(dirname $(realpath $0))
cd ${TEST_APP_PATH}
PYTORCH_IOS_NIGHTLY_NAME=libtorch_ios_nightly_build.zip
VISION_IOS_NIGHTLY_NAME=libtorchvision_ops_ios_nightly_build.zip
echo "Downloading torch libs and vision... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/VisionTestApp/setup.sh", "license": "bsd-3-clause", "size": 875} |
### File: ios/build_ios.sh
#!/bin/bash
set -ex -o pipefail
echo ""
echo "DIR: $(pwd)"
VISION_IOS_ROOT=$(dirname $(realpath $0))
if ! [ -n "${LIBTORCH_HEADER_ROOT:-}" ]; then
echo "Missing parameter: LIBTORCH_HEADER_ROOT"
exit 1
fi
if [ -n "${IOS_ARCH:-}" ]; then
if [ "${IOS_ARCH:-}" == "arm64" ]; then
IOS_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/pytorch-vision", "path": "ios/build_ios.sh", "license": "bsd-3-clause", "size": 725} |
### File: packaging/cut_release.sh
#!/usr/bin/env bash
#
# Usage (run from root of project):
# TEST_INFRA_BRANCH=release/2.1 RELEASE_BRANCH=release/2.1 RELEASE_VERSION=2.1.0 packaging/cut_release.sh
#
# TEST_INFRA_BRANCH: The release branch of test-infra that houses all reusable
# workflows
#
# RELEASE_BRANCH: The name... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/cut_release.sh", "license": "bsd-3-clause", "size": 1214} |
### File: packaging/post_build_script.sh
#!/bin/bash
LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/post_build_script.sh", "license": "bsd-3-clause", "size": 114} |
### File: packaging/pre_build_script.sh
#!/bin/bash
if [[ "$(uname)" == Darwin ]]; then
# Uninstall Conflicting jpeg brew formulae
jpeg_packages=$(brew list | grep jpeg)
echo "Existing Jpeg-related Brew libraries"
echo $jpeg_packages
for pkg in $jpeg_packages; do
brew uninstall --ignore-dependencies --for... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/pre_build_script.sh", "license": "bsd-3-clause", "size": 1510} |
### File: packaging/vs2019/activate.bat
:: Set env vars that tell distutils to use the compiler that we put on path
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
SET "VS_VERSION=16.0"
SET "VS_MAJOR=16"
SET "VS_YEAR=2019"
set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
set "MSYS2_ENV_CONV_EXCL=CL"
:: For Python 3.5+, ensure that w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/vs2019/activate.bat", "license": "bsd-3-clause", "size": 1203} |
### File: packaging/vs2019/install_activate.bat
set YEAR=2019
set VER=16
mkdir "%PREFIX%\etc\conda\activate.d"
COPY "%RECIPE_DIR%\activate.bat" "%PREFIX%\etc\conda\activate.d\vs%YEAR%_compiler_vars.bat"
IF "%cross_compiler_target_platform%" == "win-64" (
set "target_platform=amd64"
echo SET "CMAKE_GENERATOR=Visua... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/vs2019/install_activate.bat", "license": "bsd-3-clause", "size": 1800} |
### File: packaging/wheel/relocate.py
"""Helper script to package wheels and relocate binaries."""
import glob
import hashlib
# Standard library imports
import os
import os.path as osp
import platform
import shutil
import subprocess
import sys
import zipfile
from base64 import urlsafe_b64encode
# Third party imports... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/wheel/relocate.py", "license": "bsd-3-clause", "size": 12575} |
### File: packaging/windows/internal/build_cmake.bat
@echo on
msbuild "-p:Configuration=Release" "-p:BuildInParallel=true" "-p:MultiProcessorCompilation=true" "-p:CL_MPCount=%1" torchvision.vcxproj -maxcpucount:%1
msbuild "-p:Configuration=Release" "-p:BuildInParallel=true" "-p:MultiProcessorCompilation=true" "-p:CL_MP... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/windows/internal/build_cmake.bat", "license": "bsd-3-clause", "size": 309} |
### File: packaging/windows/internal/build_cpp_example.bat
@echo on
set CL=/I"C:\Program Files (x86)\torchvision\include"
msbuild "-p:Configuration=Release" "-p:BuildInParallel=true" "-p:MultiProcessorCompilation=true" "-p:CL_MPCount=%1" hello-world.vcxproj -maxcpucount:%1
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/windows/internal/build_cpp_example.bat", "license": "bsd-3-clause", "size": 215} |
### File: packaging/windows/internal/build_frcnn.bat
@echo on
set CL=/I"C:\Program Files (x86)\torchvision\include"
msbuild "-p:Configuration=Release" "-p:BuildInParallel=true" "-p:MultiProcessorCompilation=true" "-p:CL_MPCount=%1" test_frcnn_tracing.vcxproj -maxcpucount:%1
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/windows/internal/build_frcnn.bat", "license": "bsd-3-clause", "size": 222} |
### File: packaging/windows/internal/vc_env_helper.bat
@echo on
set VC_VERSION_LOWER=17
set VC_VERSION_UPPER=18
if "%VC_YEAR%" == "2019" (
set VC_VERSION_LOWER=16
set VC_VERSION_UPPER=17
)
if "%VC_YEAR%" == "2017" (
set VC_VERSION_LOWER=15
set VC_VERSION_UPPER=16
)
for /f "usebackq tokens=*" %%i in (`... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pytorch-vision", "path": "packaging/windows/internal/vc_env_helper.bat", "license": "bsd-3-clause", "size": 1057} |
### File: references/classification/presets.py
import torch
from torchvision.transforms.functional import InterpolationMode
def get_module(use_v2):
# We need a protected import to avoid the V2 warning in case just V1 is used
if use_v2:
import torchvision.transforms.v2
return torchvision.trans... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/classification/presets.py", "license": "bsd-3-clause", "size": 3885} |
### File: references/classification/sampler.py
import math
import torch
import torch.distributed as dist
class RASampler(torch.utils.data.Sampler):
"""Sampler that restricts data loading to a subset of the dataset for distributed,
with repeated augmentation.
It ensures that different each augmented versi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/classification/sampler.py", "license": "bsd-3-clause", "size": 2395} |
### File: references/classification/train.py
import datetime
import os
import time
import warnings
import presets
import torch
import torch.utils.data
import torchvision
import torchvision.transforms
import utils
from sampler import RASampler
from torch import nn
from torch.utils.data.dataloader import default_collate... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/classification/train.py", "license": "bsd-3-clause", "size": 23154} |
### File: references/classification/train_quantization.py
import copy
import datetime
import os
import time
import torch
import torch.ao.quantization
import torch.utils.data
import torchvision
import utils
from torch import nn
from train import evaluate, load_data, train_one_epoch
def main(args):
if args.output_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/classification/train_quantization.py", "license": "bsd-3-clause", "size": 11093} |
### File: references/classification/transforms.py
import math
from typing import Tuple
import torch
from presets import get_module
from torch import Tensor
from torchvision.transforms import functional as F
def get_mixup_cutmix(*, mixup_alpha, cutmix_alpha, num_categories, use_v2):
transforms_module = get_module... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/classification/transforms.py", "license": "bsd-3-clause", "size": 7568} |
### File: references/classification/utils.py
import copy
import datetime
import errno
import hashlib
import os
import time
from collections import defaultdict, deque, OrderedDict
from typing import List, Optional, Tuple
import torch
import torch.distributed as dist
class SmoothedValue:
"""Track a series of value... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/classification/utils.py", "license": "bsd-3-clause", "size": 15770} |
### File: references/depth/stereo/cascade_evaluation.py
import os
import warnings
import torch
import torchvision
import torchvision.prototype.models.depth.stereo
import utils
from torch.nn import functional as F
from train import make_eval_loader
from utils.metrics import AVAILABLE_METRICS
from visualization import ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/depth/stereo/cascade_evaluation.py", "license": "bsd-3-clause", "size": 11900} |
### File: references/depth/stereo/parsing.py
import argparse
from functools import partial
import torch
from presets import StereoMatchingEvalPreset, StereoMatchingTrainPreset
from torchvision.datasets import (
CarlaStereo,
CREStereo,
ETH3DStereo,
FallingThingsStereo,
InStereo2k,
Kitti2012Ster... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/depth/stereo/parsing.py", "license": "bsd-3-clause", "size": 3437} |
### File: references/depth/stereo/presets.py
from typing import Optional, Tuple, Union
import torch
import transforms as T
class StereoMatchingEvalPreset(torch.nn.Module):
def __init__(
self,
mean: float = 0.5,
std: float = 0.5,
resize_size: Optional[Tuple[int, ...]] = None,
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/depth/stereo/presets.py", "license": "bsd-3-clause", "size": 5200} |
### File: references/depth/stereo/train.py
import argparse
import os
import warnings
from pathlib import Path
from typing import List, Union
import numpy as np
import torch
import torch.distributed as dist
import torchvision.models.optical_flow
import torchvision.prototype.models.depth.stereo
import utils
import visua... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/depth/stereo/train.py", "license": "bsd-3-clause", "size": 33426} |
### File: references/depth/stereo/transforms.py
import random
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import PIL.Image
import torch
import torchvision.transforms as T
import torchvision.transforms.functional as F
from torch import Tensor
T_FLOW = Union[Tensor, np.ndarray... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pytorch-vision", "path": "references/depth/stereo/transforms.py", "license": "bsd-3-clause", "size": 26265} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.