Giter VIP home page Giter VIP logo

Comments (1)

s5377689 avatar s5377689 commented on June 6, 2024

從attack_utils.patch_utils導入extract_roi,evaluate_vanishing_patch,evaluate_mislabeling_patch 從dataset_utils.preprocessing導入letterbox_image_padded 從models.yolov3導入YOLOv3_Darknet53 從misc_utils.visualization導入visible_detections 從tensorflow.keras導入後端作為K 從tqdm導入tqdm 從PIL導入圖像 導入numpy作為np 導入日期時間 導入 os K.clear_session()

weights = 'model_weights/YOLOv3_Darknet53.h5' # TODO:將此路徑更改為受害者模型的權重 #weights = '/research/projects/robust-object-detection/model_weights/YOLOv3_VOC0712_Darknet53.h5' # TODO:將此路徑更改為受害者模型的權重

檢測器= YOLOv3_Darknet53(權重=權重)

警告:tensorflow:

以下變量用於 Lambda 層的調用 (tf.nn.volving),但
不存在於其跟踪對像中:
<tf.Variable 'conv2d/kernel:0' shape=(3, 3, 3, 32) dtype=float32>
這可能是有意的行為,但更可能是
遺漏。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
警告:tensorflow:
以下變量用於 Lambda 層的調用 (tf.compat.v1.nn.fused_batch_norm),但
不存在於其跟踪對像中:
<tf.Variable 'batch_normalization/gamma:0' shape=(32, ) dtype=float32>
<tf.Variable 'batch_normalization/beta:0' shape=(32,
這可能是有意的行為,但更有可能是
疏忽。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
警告:tensorflow:
以下變量用於 Lambda 層的調用 (tf.nn.convolution_1),但
不存在於其跟踪對像中:
<tf.Variable 'conv2d_1/kernel:0' shape=(3, 3, 32, 64) dtype=float32>
這可能是有意的行為,但更可能是
遺漏。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
警告:張量流:
以下變量用於 Lambda 層的調用 (tf.compat.v1.nn.fused_batch_norm_1),但
不存在於其跟踪對像中:
...
<tf.Variable 'batch_normalization_58/beta:0' shape=(256,) dtype=float32>
這可能是有意的行為,但更可能是
疏忽。這強烈表明該層應被
制定為子類層而不是 Lambda 層。
輸出被截斷。作為可滾動元素查看或在文本編輯器中打開。調整單元格輸出設置...
IndexError Traceback (most recent call last) C:\TEMP\ipykernel_9648\2429568344.py in 2 #weights = '/research/projects/robust-object-detection/model_weights/YOLOv3_VOC0712_Darknet53.h5' # TODO: Change this path to the victim model's weights 3 ----> 4 detector = YOLOv3_Darknet53(weights=weights)

c:\Users\User\Desktop\TOG\models\yolov3.py in init(self, weights, model_img_size, confidence_thresh_default, confidence_thresh_eval) 241 def init(self, weights, model_img_size=(416, 416), confidence_thresh_default=0.20, confidence_thresh_eval=0.01): 242 super().init(weights, yolo_darknet53, --> 243 model_img_size, confidence_thresh_default, confidence_thresh_eval) 244 245

c:\Users\User\Desktop\TOG\models\yolov3.py in init(self, weights, backbone, model_img_size, confidence_thresh_default, confidence_thresh_eval) 18 self.num_anchors = len(self.anchors) 19 ---> 20 self.model = backbone(Input(shape=(None, None, 3)), self.num_anchors // 3, self.num_classes) 21 self.model.load_weights(weights) 22

c:\Users\User\Desktop\TOG\yolov3_utils\model.py in yolo_darknet53(inputs, num_anchors, num_classes) 69 70 x = compose(DarknetConv2D_BN_Leaky(256, (1, 1)), UpSampling2D(2))(x) ---> 71 x = Concatenate()([x, darknet.layers[152].output]) 72 x, y2 = make_last_layers(x, 256, num_anchors * (num_classes + 5)) 73 y2 = Reshape((tf) .shape(y2)[1], tf.shape(y2)[2], num_anchors, num_classes + 5))(y2)

IndexError:列表索引超出範圍

TOG_yolov3_utils_model.txt

from tog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.