ó
¾÷Xc        	   @@ sw  d  d l  m Z d  d l  m Z d  d l Z d  d l Z d  d l Z d d l m Z d d l m Z d d l m	 Z	 d d l m
 Z
 d d	 l m Z d d
 l m Z d d l m Z d d l m Z e j j d ƒ Z e j e e j ƒ sô d Z n  e j j e d ƒ Z e j j e ƒ s+e j e ƒ n  d Z e j j e j j e d ƒ ƒ Z e j j e ƒ rQe j e e ƒ ƒ Z e j d e ƒ  ƒ Z e d d d h k s©t ‚ e j d e ƒ  ƒ Z  e! e  e" ƒ sÓt ‚ e j d e ƒ Z# e# d d h k sýt ‚ e j d e ƒ  ƒ Z$ e$ d d h k s*t ‚ e
 e ƒ e	 e  ƒ e e$ ƒ e# Z n  e j j e ƒ sÅi e ƒ  d 6e ƒ  d 6e d 6e ƒ  d 6Z e e d ƒ # Z% e% j& e j' e d d ƒƒ Wd QXn  d e j( k re j( d Z# e# d d h k sùt ‚ e# Z n  e d k r+e j) j& d  ƒ d d! l* Tn? e d k rTe j) j& d" ƒ d d! l+ Tn e, d# e- e ƒ ƒ ‚ d$ „  Z. d S(%   i    (   t   absolute_import(   t   print_functionNi   (   t   epsilon(   t   floatx(   t   set_epsilon(   t
   set_floatx(   t   cast_to_floatx(   t   image_data_format(   t   set_image_data_format(   t   is_keras_tensort   ~s   /tmps   .kerast
   tensorflows
   keras.jsonR   t   float16t   float32t   float64R   t   backendt   theanoR   t   channels_lastt   channels_firstt   wt   indenti   t   KERAS_BACKENDs   Using Theano backend.
(   t   *s   Using TensorFlow backend.
s   Unknown backend: c           C@ s   t  S(   s÷   Publicly accessible method
    for determining the current backend.

    # Returns
        String, the name of the backend Keras is currently using.

    # Example
    ```python
        >>> keras.backend.backend()
        'tensorflow'
    ```
    (   t   _BACKEND(    (    (    s5   /tmp/pip-build-isqEY4/keras/keras/backend/__init__.pyR   E   s    (/   t
   __future__R    R   t   ost   jsont   syst   commonR   R   R   R   R   R   R   R	   t   patht
   expandusert   _keras_base_dirt   accesst   W_OKt   joint
   _keras_dirt   existst   makedirsR   t   _config_patht   loadt   opent   _configt   gett   _floatxt   AssertionErrort   _epsilont
   isinstancet   floatt   _backendt   _image_data_formatt   ft   writet   dumpst   environt   stderrt   theano_backendt   tensorflow_backendt
   ValueErrort   strR   (    (    (    s5   /tmp/pip-build-isqEY4/keras/keras/backend/__init__.pyt   <module>   sl   	!	


	
%	