text stringlengths 5 261k | id stringlengths 16 106 | metadata dict | __index_level_0__ int64 0 266 |
|---|---|---|---|
sudo pip install --upgrade pip
sudo pip install -e ".[tests]"
echo "sh shell/lint.sh" > .git/hooks/pre-commit
chmod a+x .git/hooks/pre-commit | autokeras/.devcontainer/setup.sh/0 | {
"file_path": "autokeras/.devcontainer/setup.sh",
"repo_id": "autokeras",
"token_count": 53
} | 0 |
# Copyright 2020 The AutoKeras Authors.
#
# 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 i... | autokeras/autokeras/blocks/wrapper.py/0 | {
"file_path": "autokeras/autokeras/blocks/wrapper.py",
"repo_id": "autokeras",
"token_count": 4560
} | 1 |
# Copyright 2020 The AutoKeras Authors.
#
# 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 i... | autokeras/autokeras/engine/preprocessor.py/0 | {
"file_path": "autokeras/autokeras/engine/preprocessor.py",
"repo_id": "autokeras",
"token_count": 649
} | 2 |
# Copyright 2020 The AutoKeras Authors.
#
# 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 i... | autokeras/autokeras/pipeline.py/0 | {
"file_path": "autokeras/autokeras/pipeline.py",
"repo_id": "autokeras",
"token_count": 3266
} | 3 |
# Copyright 2020 The AutoKeras Authors.
#
# 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 i... | autokeras/autokeras/tuners/greedy.py/0 | {
"file_path": "autokeras/autokeras/tuners/greedy.py",
"repo_id": "autokeras",
"token_count": 3643
} | 4 |
# Copyright 2020 The AutoKeras Authors.
#
# 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 i... | autokeras/autokeras/utils/utils.py/0 | {
"file_path": "autokeras/autokeras/utils/utils.py",
"repo_id": "autokeras",
"token_count": 2354
} | 5 |
FROM python:3.7
RUN pip install flake8 black isort
WORKDIR /autokeras
CMD ["python", "docker/pre_commit.py"]
| autokeras/docker/pre-commit.Dockerfile/0 | {
"file_path": "autokeras/docker/pre-commit.Dockerfile",
"repo_id": "autokeras",
"token_count": 43
} | 6 |
import pathlib
import shutil
from inspect import getdoc
from inspect import isclass
from typing import Dict
from typing import List
from typing import Union
from typing import get_type_hints
from . import utils
from .docstring import process_docstring
from .examples import copy_examples
from .get_signatures import get... | autokeras/docs/keras_autodoc/autogen.py/0 | {
"file_path": "autokeras/docs/keras_autodoc/autogen.py",
"repo_id": "autokeras",
"token_count": 2855
} | 7 |
"""shell
pip install autokeras
"""
import os
import numpy as np
import tensorflow as tf
from sklearn.datasets import load_files
import autokeras as ak
"""
To make this tutorial easy to follow, we just treat IMDB dataset as a
regression dataset. It means we will treat prediction targets of IMDB dataset,
which are 0s ... | autokeras/docs/py/text_regression.py/0 | {
"file_path": "autokeras/docs/py/text_regression.py",
"repo_id": "autokeras",
"token_count": 1992
} | 8 |
:root>* {
--md-primary-fg-color: #d00000;
--md-accent-fg-color: #d00000;
} | autokeras/docs/templates/stylesheets/extra.css/0 | {
"file_path": "autokeras/docs/templates/stylesheets/extra.css",
"repo_id": "autokeras",
"token_count": 38
} | 9 |
from distutils.core import setup
from pathlib import Path
from setuptools import find_packages
this_file = Path(__file__).resolve()
readme = this_file.parent / "README.md"
setup(
name="autokeras",
description="AutoML for deep learning",
package_data={"": ["README.md"]},
long_description=readme.read_t... | autokeras/setup.py/0 | {
"file_path": "autokeras/setup.py",
"repo_id": "autokeras",
"token_count": 771
} | 10 |
# keras-cv Single Stage Two-Dimensional Object Detection API
| Status | Proposed |
:-------------- |:---------------------------------------------------- |
| **Author(s)** | Zhenyu Tan (tanzheny@google.com), Francois Chollet (fchollet@google.com)|
| **Contributor(s)** | Pengchong Jin (pengchong@google.com)... | governance/rfcs/20200928-keras-cv-single-stage-2d-object-detection.md/0 | {
"file_path": "governance/rfcs/20200928-keras-cv-single-stage-2d-object-detection.md",
"repo_id": "governance",
"token_count": 6025
} | 11 |
sudo: required
dist: trusty
language: python
matrix:
include:
- python: 2.7
env: KERAS_BACKEND=tensorflow TEST_MODE=PEP8
- python: 2.7
env: KERAS_BACKEND=tensorflow
- python: 2.7
env: KERAS_BACKEND=tensorflow KERAS_HEAD=true
- python: 3.6
env: ... | keras-applications/.travis.yml/0 | {
"file_path": "keras-applications/.travis.yml",
"repo_id": "keras-applications",
"token_count": 1665
} | 12 |
"""ResNet models for Keras.
# Reference paper
- [Deep Residual Learning for Image Recognition]
(https://arxiv.org/abs/1512.03385) (CVPR 2016 Best Paper Award)
# Reference implementations
- [TensorNets]
(https://github.com/taehoonlee/tensornets/blob/master/tensornets/resnets.py)
- [Caffe ResNet]
(https://githu... | keras-applications/keras_applications/resnet.py/0 | {
"file_path": "keras-applications/keras_applications/resnet.py",
"repo_id": "keras-applications",
"token_count": 363
} | 13 |
# keras-contrib : Keras community contributions
Keras-contrib is deprecated. Use [TensorFlow Addons](https://github.com/tensorflow/addons).
## The future of Keras-contrib:
We're migrating to [tensorflow/addons](https://github.com/tensorflow/addons). See the announcement [here](https://github.com/keras-team/keras-con... | keras-contrib/README.md/0 | {
"file_path": "keras-contrib/README.md",
"repo_id": "keras-contrib",
"token_count": 1072
} | 14 |
{%- for toc_item in toc_item.children %}
<li class="toctree-l{{ navlevel}}"><a class="reference internal" href="{% if not nav_item == page %}{{ nav_item.url|url }}{% endif %}{{ toc_item.url }}">{{ toc_item.title }}</a>
{%- set navlevel = navlevel + 1 %}
{%- if navlevel <= config.theme.navigation_depth and ... | keras-contrib/contrib_docs/theme/toc.html/0 | {
"file_path": "keras-contrib/contrib_docs/theme/toc.html",
"repo_id": "keras-contrib",
"token_count": 215
} | 15 |
from .densenet import DenseNet
from .resnet import ResNet, ResNet18, ResNet34, ResNet50, ResNet101, ResNet152
from .wide_resnet import WideResidualNetwork
from .nasnet import NASNet, NASNetLarge, NASNetMobile
| keras-contrib/keras_contrib/applications/__init__.py/0 | {
"file_path": "keras-contrib/keras_contrib/applications/__init__.py",
"repo_id": "keras-contrib",
"token_count": 67
} | 16 |
from __future__ import absolute_import
from keras import backend as K
from keras.constraints import Constraint
class Clip(Constraint):
"""Clips weights to [-c, c].
# Arguments
c: Clipping parameter.
"""
def __init__(self, c=0.01):
self.c = c
def __call__(self, p):
return... | keras-contrib/keras_contrib/constraints/clip.py/0 | {
"file_path": "keras-contrib/keras_contrib/constraints/clip.py",
"repo_id": "keras-contrib",
"token_count": 202
} | 17 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from keras.layers import Layer
from keras_contrib import backend as KC
from keras_contrib.utils.conv_utils import normalize_data_format
class SubPixelUpscaling(Layer):
""" Sub-pixel convolutional upscaling layer.
This layer requires a Convoluti... | keras-contrib/keras_contrib/layers/convolutional/subpixelupscaling.py/0 | {
"file_path": "keras-contrib/keras_contrib/layers/convolutional/subpixelupscaling.py",
"repo_id": "keras-contrib",
"token_count": 1456
} | 18 |
from keras import backend as K
from keras.optimizers import Optimizer
class Yogi(Optimizer):
"""Yogi optimizer.
Yogi is a variation of Adam that controls the increase in effective
learning rate, which (according to the paper) leads to even better
performance than Adam with similar theoretical guarante... | keras-contrib/keras_contrib/optimizers/yogi.py/0 | {
"file_path": "keras-contrib/keras_contrib/optimizers/yogi.py",
"repo_id": "keras-contrib",
"token_count": 1858
} | 19 |
import numpy as np
import pytest
from keras import backend as K
from keras.layers import Input
from keras.models import Sequential, Model
from numpy.testing import assert_allclose
from keras_contrib.layers import InstanceNormalization
from keras_contrib.utils.test_utils import layer_test
input_1 = np.arange(10)
input... | keras-contrib/tests/keras_contrib/layers/normalization/test_instancenormalization.py/0 | {
"file_path": "keras-contrib/tests/keras_contrib/layers/normalization/test_instancenormalization.py",
"repo_id": "keras-contrib",
"token_count": 3078
} | 20 |
from markdown import markdown
from docs import autogen
import pytest
test_doc1 = {
'doc': """Base class for recurrent layers.
# Arguments
cell: A RNN cell instance. A RNN cell is a class that has:
- a `call(input_at_t, states_at_t)` method, returning
`(output_at_t, states_a... | keras-contrib/tests/tooling/test_doc_auto_generation.py/0 | {
"file_path": "keras-contrib/tests/tooling/test_doc_auto_generation.py",
"repo_id": "keras-contrib",
"token_count": 5533
} | 21 |
# Keras Core is becoming Keras 3 and has moved to keras-team/keras
Multi-backend Keras has a new repo: [keras-team/keras](https://github.com/keras-team/keras).
Open any issues / PRs there. `keras-team/keras-core` is no longer in use.
**Keras Core** was the codename of the multi-backend Keras project throughout its in... | keras-core/README.md/0 | {
"file_path": "keras-core/README.md",
"repo_id": "keras-core",
"token_count": 331
} | 22 |
import time
import keras_core
class BenchmarkMetricsCallback(keras_core.callbacks.Callback):
def __init__(self, start_batch=1, stop_batch=None):
self.start_batch = start_batch
self.stop_batch = stop_batch
# Store the throughput of each epoch.
self.state = {"throughput": []}
... | keras-core/benchmarks/model_benchmark/benchmark_utils.py/0 | {
"file_path": "keras-core/benchmarks/model_benchmark/benchmark_utils.py",
"repo_id": "keras-core",
"token_count": 348
} | 23 |
import numpy as np
import keras_core
from keras_core import layers
from keras_core.utils import to_categorical
# Model / data parameters
num_classes = 10
input_shape = (28, 28, 1)
# Load the data and split it between train and test sets
(x_train, y_train), (x_test, y_test) = keras_core.datasets.mnist.load_data()
# S... | keras-core/examples/demo_mnist_convnet.py/0 | {
"file_path": "keras-core/examples/demo_mnist_convnet.py",
"repo_id": "keras-core",
"token_count": 645
} | 24 |
"""
Title: English speaker accent recognition using Transfer Learning
Author: [Fadi Badine](https://twitter.com/fadibadine)
Converted to Keras Core by: [Fadi Badine](https://twitter.com/fadibadine)
Date created: 2022/04/16
Last modified: 2023/07/19
Description: Training a model to classify UK & Ireland accents using fe... | keras-core/examples/keras_io/tensorflow/audio/uk_ireland_accent_recognition.py/0 | {
"file_path": "keras-core/examples/keras_io/tensorflow/audio/uk_ireland_accent_recognition.py",
"repo_id": "keras-core",
"token_count": 7353
} | 25 |
"""
Title: End-to-end Masked Language Modeling with BERT
Author: [Ankur Singh](https://twitter.com/ankur310794)
Converted to Keras-Core: [Mrutyunjay Biswal](https://twitter.com/LearnStochastic)
Date created: 2020/09/18
Last modified: 2023/09/06
Description: Implement a Masked Language Model (MLM) with BERT and fine-tun... | keras-core/examples/keras_io/tensorflow/nlp/end_to_end_mlm_with_bert.py/0 | {
"file_path": "keras-core/examples/keras_io/tensorflow/nlp/end_to_end_mlm_with_bert.py",
"repo_id": "keras-core",
"token_count": 6779
} | 26 |
"""
Title: Zero-DCE for low-light image enhancement
Author: [Soumik Rakshit](http://github.com/soumik12345)
Converted to Keras Core by: [Soumik Rakshit](http://github.com/soumik12345)
Date created: 2021/09/18
Last modified: 2023/07/15
Description: Implementing Zero-Reference Deep Curve Estimation for low-light image en... | keras-core/examples/keras_io/tensorflow/vision/zero_dce.py/0 | {
"file_path": "keras-core/examples/keras_io/tensorflow/vision/zero_dce.py",
"repo_id": "keras-core",
"token_count": 7947
} | 27 |
End of preview. Expand in Data Studio
- Downloads last month
- 9