This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
class ConvLSTM(tf.keras.Model): | |
def __init__(self, dim_out): | |
super(ConvLSTM, self).__init__() | |
self.dim_out = dim_out | |
self.Wf = tf.keras.layers.Conv2D(dim_out, 5, 1, "same") | |
self.Wu = tf.keras.layers.Conv2D(dim_out, 5, 1, "same") | |
self.Wi = tf.keras.layers.Conv2D(dim_out, 5, 1, "same") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.layers import Conv2D, Activation, BatchNormalization, Add, Input, GlobalAveragePooling2D, Dense | |
from keras.models import Model | |
from keras.optimizers import SGD | |
from keras.datasets import cifar10 | |
from keras.utils import to_categorical | |
from keras.initializers import he_normal | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.callbacks import Callback, LearningRateScheduler | |
from keras.regularizers import l2 | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras import backend as K | |
from keras import regularizers, constraints, initializers, activations | |
from keras.layers.recurrent import RNN, Layer, _generate_dropout_mask, _generate_dropout_ones | |
from keras.engine import InputSpec | |
from keras.legacy import interfaces | |
import warnings | |
# Copied from original keras source | |
def _time_distributed_dense(x, w, b=None, dropout=None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import OpenEXR as exr | |
import Imath | |
def readEXR(filename): | |
"""Read color + depth data from EXR image file. | |
Parameters | |
---------- | |
filename : str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=X Virtual Frame Buffer Service | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24 | |
[Install] | |
WantedBy=multi-user.target |