CoolFace
Apppublic

karolmajek/maxdeeplab

sourceHugging Faceupdated 5y agoView on Hugging Face
0likes
merge_semantic_and_instance_maps_op.py29 linesDownload Raw Back to ops
1# coding=utf-82# Copyright 2021 The Deeplab2 Authors.3#4# Licensed under the Apache License, Version 2.0 (the "License");5# you may not use this file except in compliance with the License.6# You may obtain a copy of the License at7#8#     http://www.apache.org/licenses/LICENSE-2.09#10# Unless required by applicable law or agreed to in writing, software11# distributed under the License is distributed on an "AS IS" BASIS,12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13# See the License for the specific language governing permissions and14# limitations under the License.15 16"""Utility function for the C++ TensorFlow MergeSemanticAndInstanceMaps op."""17 18import tensorflow as tf19 20# Make the TensorFlow MergeSemanticAndInstanceMaps op accessible by importing21# merge_semantic_and_instance_maps_op.py.22from tensorflow.python.framework import load_library23from tensorflow.python.platform import resource_loader24gen_merge_semantic_and_instance_maps_op = load_library.load_op_library(resource_loader.get_path_to_datafile('../../kernels/merge_semantic_and_instance_maps_op.so'))25 26merge_semantic_and_instance_maps = gen_merge_semantic_and_instance_maps_op.merge_semantic_and_instance_maps27 28tf.no_gradient('MergeSemanticAndInstanceMaps')29