Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion datasets/prepare_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import cv2
import numpy as np
import json
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from scipy.misc import imresize


Expand Down
5 changes: 4 additions & 1 deletion datasets/prepare_div2k_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import argparse
from tqdm import tqdm
import cv2
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf


def bytes_feature(value):
Expand Down
5 changes: 4 additions & 1 deletion evaluate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
import numpy as np
import argparse
import os
Expand Down
5 changes: 4 additions & 1 deletion generate_header_and_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
import numpy as np
import argparse
import os
Expand Down
5 changes: 4 additions & 1 deletion models/dataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from collections import OrderedDict


Expand Down
7 changes: 5 additions & 2 deletions models/image_warp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf


def image_warp(images, flow, name='image_warp'):
Expand Down Expand Up @@ -39,4 +42,4 @@ def gather(y_coords, x_coords):

interpolated = tf.reshape(interpolated, shape)

return interpolated
return interpolated
5 changes: 4 additions & 1 deletion models/model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from abc import ABC, abstractmethod
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
import json
from .dataset import Dataset

Expand Down
5 changes: 4 additions & 1 deletion models/model_espcn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from .model import Model


Expand Down
5 changes: 4 additions & 1 deletion models/model_srcnn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from .model import Model


Expand Down
5 changes: 4 additions & 1 deletion models/model_vespcn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from .model import Model
from .image_warp import image_warp

Expand Down
5 changes: 4 additions & 1 deletion models/model_vsrnet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from .model import Model


Expand Down
5 changes: 4 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
import argparse
from tqdm import tqdm
import os
Expand Down