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.models import Model | |
from keras.layers import Input | |
from keras.layers.convolutional import Convolution2D | |
from keras.layers.convolutional import Deconvolution2D | |
from keras.layers import merge | |
import numpy as np | |
''' | |
Attempt at implementing a smaller version of "Image Restoration Using Convolutional Auto-encoders with Symmetric Skip Connections" | |
(http://arxiv.org/abs/1606.08921) |
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 scipy.misc import imread, imresize, imsave | |
from scipy.optimize import fmin_l_bfgs_b | |
import numpy as np | |
import time | |
import os | |
import argparse | |
import h5py | |
from keras.models import Sequential | |
from keras.layers.convolutional import Convolution2D, ZeroPadding2D, AveragePooling2D, MaxPooling2D |
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.regularizers import ActivityRegularizer | |
dummy_loss_val = K.variable(0.0) | |
# Dummy loss function which simply returns 0 | |
# This is because we will be training the network using regularizers. | |
def dummy_loss(y_true, y_pred): | |
return dummy_loss_val |
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 __future__ import print_function | |
import densenet | |
import numpy as np | |
import sklearn.metrics as metrics | |
from keras.datasets import cifar10 | |
from keras.utils import np_utils | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.optimizers import Adam |
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
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
'''Trains an SRU model on the IMDB sentiment classification task. | |
The dataset is actually too small for LSTM to be of any advantage | |
compared to simpler, much faster methods such as TF-IDF + LogReg. | |
Notes: | |
- RNNs are tricky. Choice of batch size is important, | |
choice of loss and optimizer is critical, etc. | |
Some configurations won't converge. | |
- LSTM loss decrease patterns during training can be quite different | |
from what you see with CNNs/MLPs/etc. | |
''' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer