Skip to content

Commit

Permalink
eager_excuetion off
Browse files Browse the repository at this point in the history
  • Loading branch information
penny4860 committed Aug 17, 2019
1 parent 8120f75 commit 9bf25b8
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions eval.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
import tensorflow as tf
tf.compat.v1.enable_eager_execution()

import argparse

argparser = argparse.ArgumentParser(
Expand Down
1 change: 0 additions & 1 deletion pred.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-

import tensorflow as tf
tf.compat.v1.enable_eager_execution()
import argparse
import cv2
import matplotlib.pyplot as plt
Expand Down
2 changes: 0 additions & 2 deletions train_eager.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-

import tensorflow as tf
tf.compat.v1.enable_eager_execution()

import argparse
from yolo.train import train_fn
from yolo.config import ConfigParser
Expand Down
1 change: 0 additions & 1 deletion yolo/dataset/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ def normalize(image):


if __name__ == '__main__':
tf.enable_eager_execution()
import os
import glob
from yolo import PROJECT_ROOT
Expand Down
2 changes: 0 additions & 2 deletions yolo/loss/calc_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import tensorflow as tf
import numpy as np
# tf.enable_eager_execution()
from yolo.loss.utils import adjust_pred_tensor, adjust_true_tensor
from yolo.loss.utils import conf_delta_tensor
from yolo.loss.utils import loss_class_tensor, loss_conf_tensor, loss_coord_tensor, wh_scale_tensor
Expand Down Expand Up @@ -77,7 +76,6 @@ def run(self, y_true, y_pred, anchors=[90, 95, 92, 154, 139, 281]):
if __name__ == '__main__':
import os
from yolo import PROJECT_ROOT
tf.enable_eager_execution()
def test():
yolo_1 = np.load(os.path.join(PROJECT_ROOT, "yolo_1.npy")).astype(np.float32)
pred_yolo_1 = np.load(os.path.join(PROJECT_ROOT, "pred_yolo_1.npy")).astype(np.float32)
Expand Down
1 change: 0 additions & 1 deletion yolo/net/bodynet.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def call(self, input_tensor, training=False):

if __name__ == '__main__':
import numpy as np
tf.enable_eager_execution()
imgs = np.random.randn(1, 256, 256, 3).astype(np.float32)
input_tensor = tf.constant(imgs)

Expand Down
1 change: 0 additions & 1 deletion yolo/net/headnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ def call(self, input_tensor, training=False):

if __name__ == '__main__':
import numpy as np
tf.enable_eager_execution()
s3 = tf.constant(np.random.randn(1, 32, 32, 256).astype(np.float32))
s4 = tf.constant(np.random.randn(1, 16, 16, 512).astype(np.float32))
s5 = tf.constant(np.random.randn(1, 8, 8, 1024).astype(np.float32))
Expand Down
4 changes: 0 additions & 4 deletions yolo/net/weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ def _load_4d_var(self, variable):


if __name__ == '__main__':
# Todo : tensorflow를 import 했을 때 / 안했을 때 offset 결과가 다르다.
# import tensorflow as tf
# tf.enable_eager_execution()

from yolo.net.yolonet import Yolonet
from yolo import YOLOV3_WEIGHTS
yolonet = Yolonet(18)
Expand Down
1 change: 0 additions & 1 deletion yolo/net/yolonet.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def preprocess_input(image, net_size):


if __name__ == '__main__':
tf.enable_eager_execution()
inputs = tf.constant(np.random.randn(1, 256, 256, 3).astype(np.float32))

# (1, 256, 256, 3) => (1, 8, 8, 1024)
Expand Down
1 change: 0 additions & 1 deletion yolo/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,4 @@ def _grad_fn(model, images_tensor, list_y_trues):


if __name__ == '__main__':
tf.compat.v1.enable_eager_execution()
pass

0 comments on commit 9bf25b8

Please sign in to comment.