application_vnd.jupyter.stderr_output_1.png image_output_1.png
from tensorflow.keras import backend

from tensorflow.keras.layers import Activation

from tensorflow.keras.layers import Conv2D

from tensorflow.keras.models import Sequential

from tensorflow.keras.utils import plot_model

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Activation
from tensorflow.keras import backend
class SRCNN:
    @staticmethod
    def build(width, height, depth):
        model = Sequential()
        input_shape = (height, width, depth)
        if backend.image_data_format() == 'channels_first':
            input_shape = (depth, height, width)
        model.add(Conv2D(64, (9, 9), kernel_initializer='he_normal', input_shape=input_shape))
        model.add(Activation('relu'))
        model.add(Conv2D(32, (1, 1), kernel_initializer='he_normal'))
        model.add(Activation('relu'))
        model.add(Conv2D(depth, (5, 5), kernel_initializer='he_normal'))
        model.add(Activation('relu'))
        return model

from tensorflow.keras.utils import plot_model
model = SRCNN.build(33, 33, 3)
plot_model(model, to_file='srcnn.png', show_shapes=True)