Skip to content

Instantly share code, notes, and snippets.

View feay1234's full-sized avatar
🏠
Working from home

Jarana Manoturmuksa feay1234

🏠
Working from home
  • University College London
  • London
View GitHub Profile
@naotokui
naotokui / GAN-and-trainable.py
Last active October 14, 2021 19:46
How model.trainable = False works in keras (GAN model)
# coding: utf8
## based on this article: http://qiita.com/mokemokechicken/items/937a82cfdc31e9a6ca12
import numpy as np
from keras.models import Sequential
from keras.engine.topology import Input, Container
from keras.engine.training import Model
from keras.layers.core import Dense
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bstriner
bstriner / keras_backend_optimizer_example.py
Last active October 13, 2021 01:23
How to use Keras backend and optimizers directly outside of a Keras model
from keras.optimizers import Adam
from keras import backend as K
from keras.datasets import mnist
from keras.utils.np_utils import to_categorical
from keras.metrics import categorical_accuracy
from keras.initializations import glorot_uniform, zero
import numpy as np
# inputs and targets are placeholders
input_dim = 28*28
@akdh
akdh / README.md
Last active September 8, 2015 23:12
Validation testing instructions for suggestion services.

Test your service

See https://github.com/akdh/cst-tools for JSON schemas.

Assuming your service callback URL is http://127.0.0.1:5002/suggestions, you can make a request to your service and ensure that it is valid using the following commands:

curl -H "Content-Type: application/json" --data @request.json -XPOST http://127.0.0.1:5002/suggestions > response.json
python validate.py data.json 192

No errors should be produced.