semvec/pypi-packages huggingface dataset:
keras_attention_block 0.0.2
simple tools
License: MIT
Keywords: keras


keras-attention-block
===============================

* version: 0.0.2

* status: dev

* author: hsz

* email: hsz1273327@gmail.com

Desc
--------------------------------

keras-attention-block is an extension for keras to add attention. It was born from lack of existing function to add attention inside keras.
The module itself is pure Python with no dependencies on modules or packages outside the standard Python distribution and keras.



keywords:keras,deeplearning,attention


Feature
----------------------

* support one dimensional attention, that is to take in inputs whose dimensions are batch_size * time_step * hidden_size
* support two dimensional attention, that is to take in inputs of dimensions are batch_size * X * Y * hidden_size
* support self-attention, that is to take in tensors. Four well defined calculations are included : additive, multiplicative, dot-product based and  as well as linear.
* support attention, that is to take in two tensors. Three well defined calculations are included : additive, multiplicative and dot product based.
* support attention. Three well defined calculations are included : additive, multiplicative and dot product based.
* support multihead attention
* support customized calculations of similarity between Key and Query
* support customized calculations of Value

Example
-------------------------------

.. code:: python

    from keras.layers import merge
    from keras.layers.core import *
    from keras.layers.recurrent import LSTM
    from keras.layers import Convolution2D
    from keras.models import *
    from keras.layers.normalization import BatchNormalization
    from keras_attention_block import *

    INPUT_DIM = 32
    TIME_STEPS = 20
    SINGLE_ATTENTION_VECTOR = False
    APPLY_ATTENTION_BEFORE_LSTM = False

    inputs = Input(shape=(TIME_STEPS, INPUT_DIM))
    attention_mul =  SelfAttention1DLayer(similarity="linear",dropout_rate=0.2)(inputs)#MyLayer((20,32))(inputs)#
    lstm_units = 32
    #attention_mul = LSTM(lstm_units, return_sequences=False)(attention_mul)
    attention_mul = Flatten()(attention_mul)
    output = Dense(1, activation='sigmoid')(attention_mul)
    m = Model(inputs=[inputs], outputs=output)

    m.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
    print(m.summary())

    train_data = np.random.random((1000,20,32))
    train_lab = np.random.randint(0,2,1000)
    m.fit(train_data,train_lab , epochs=1, batch_size=100 )




Install
--------------------------------

- ``python -m pip install keras_attention_block``


Documentation
--------------------------------

`Documentation on Readthedocs <https://github.com/NLP-Deeplearning-Club/keras_attention_block/>`_.



TODO
-----------------------------------
* 3D attention
django-arcgis-marketplace 0.0.13
Arcgis marketplace app.
License: MIT

Django Arcgis Marketplace
=========================

|Waffle| |Pypi| |Wheel| |Build Status| |Codecov| |Code Climate|


Arcgis marketplace application.

Dependencies
------------

* Python ≥ 3.5
* Django ≥ 1.11
* Postgres


Installation
------------

Install last stable version from Pypi.

.. code:: sh

    pip install django-arcgis-marketplace


Add ``arcgis_marketplace`` to your INSTALLED_APPS setting.

.. code:: python

    INSTALLED_APPS = (
        ...
        'django_filters',
        'oauth2_provider',
        'paypal.standard.ipn',
        'polymorphic',
        'rest_framework',
        'social_django',
        'taggit',
        ...
        'core_flavor.apps.CoreAppConfig',
        'countries.apps.CountriesAppConfig',
        'orders.apps.OrdersAppConfig',
        'arcgis_marketplace.apps.ArcgisMarketplaceAppConfig'
    )

Hook the Django urls into your URLconf.

.. code:: python

    from django.conf.urls import include, url

    urlpatterns = [
        url(r'^', include(
            'arcgis_marketplace.urls',
            namespace='arcgis-marketplace')),
    ]

Apply migrations.

.. code:: python

    python manage.py migrate


.. |Waffle| image:: https://badge.waffle.io/flavors/arcgis-marketplace.png?label=ready&title=Ready 
   :target: https://waffle.io/flavors/arcgis-marketplace?utm_source=badge
   :alt: 'Stories in Ready'

.. |Pypi| image:: https://img.shields.io/pypi/v/django-arcgis-marketplace.svg
   :target: https://pypi.python.org/pypi/django-arcgis-marketplace

.. |Wheel| image:: https://img.shields.io/pypi/wheel/django-arcgis-marketplace.svg
   :target: https://pypi.python.org/pypi/django-arcgis-marketplace

.. |Build Status| image:: https://travis-ci.org/flavors/arcgis-marketplace.svg?branch=master
   :target: https://travis-ci.org/flavors/arcgis-marketplace

.. |Codecov| image:: https://img.shields.io/codecov/c/github/flavors/arcgis-marketplace.svg
   :target: https://codecov.io/gh/flavors/arcgis-marketplace

.. |Code Climate| image:: https://codeclimate.com/github/flavors/arcgis-marketplace/badges/gpa.svg
   :target: https://codeclimate.com/github/flavors/arcgis-marketplace
chainerboard 0.1.5
Visualization toolkit for Chainer
License: MIT

.. -*- coding: utf-8; -*-

An unofficial visualization tool for `chainer <https://chainer.org/>`_, inspired by `tensorboard <https://www.tensorflow.org/get_started/summaries_and_tensorboard>`_. The toolkit allows visualization of log from ``chainer.extensions.LogReport``.

Example usage:

.. code:: python

    model = L.Classifier(MyModel())

    optimizer = chainer.optimizers.Adam()
    optimizer.setup(model)

    train = create_my_data()
    train_iter = chainer.iterators.SerialIterator(train, batchsize)

    updater = training.StandardUpdater(train_iter, optimizer)
    trainer = training.Trainer(updater, (epochs, 'epoch'), out='path/to/output')

    trainer.extend(extensions.LogReport(log_name='my_log_data')))
    # optional; allows visualization of parameters
    trainer.extend(extensions.ParameterStatistics(model))

    # Run the training
    trainer.run()


and point chainerboard at the output log file to start local http server.

.. code:: bash

   chainerboard path/to/output/my_log_name


now open http://localhost:6006/ to view the log.


.. warning:: The author of this project is not a professional web
    programmer. Never use the project on remote server since it may
    impose serious security risks.



Development
============

To setup development environment:

.. code:: bash

     pip install -r requirements.txt


For testing,

.. code:: bash

     tox

Build document

.. code:: bash

     python setup.py build_sphinx