<jupyter_start><jupyter_text><jupyter_code>pip install --ignore-installed --upgrade tensorflow==2.0
!python -c 'import tensorflow as tf; print(tf.__version__)' 
from google.colab import drive
drive.mount('/content/drive')
!git clone https://github.com/slesarev-hub/pixel-cnn
%cd pixel-cnn
#!git checkout -b ahe 5de8cecf6c41b56f58cdd85d1aae1450c27673de
!python train.py --data_dir . -d ahe -b 1 -u 1 -t 5 --load_params 80 --ckpt_folder_drive_dir '/content/drive/My Drive/pixel-cnn'
!python train.py --data_dir . -d ahe -b 1 -u 1 -t 5 --ckpt_folder_drive_dir '/content/drive/My Drive/pixel-cnn'
!python3 -c 'import tensorflow as tf; print(tf.__version__)'
!python train.py --data_dir . --save_dir . -d ahe -b 1 -u 1 -t 5 -l 0<jupyter_output><empty_output><jupyter_text>**1.**![alt text](https://cdn-images-1.medium.com/freeze/max/1000/1*ToPT8jnb5mtnikmiB42hpQ.png?q=20)**Softmax** (activation function)$\sigma(\mathbf{z})_i = \frac{e^{z_i}}{\sum_{j=1}^K e^{z_j}} \text{ for } i = 1, \dotsc , K \text{ and } \mathbf z=(z_1,\dotsc,z_K) $ **2.****Softmax** - ignore relationship betwen numbers such as 220 and 221; even worse, if a pixel value never presents in the training dataset, it won’t be predicted in the testing dataset either. A better way is predict the distribution of pixel values, so every value will a have probility to present when generating images A mixture of distriction is a linear combination of a number of distributions: $p(x) = a_1 * p_1(x) + a_2 * p_2(x) + … a_n * p_n(x)$[source](https://medium.com/@smallfishbigsea/an-explanation-of-discretized-logistic-mixture-likelihood-bdfe531751f0) ![alt text](http://cs231n.github.io/assets/nn1/neuron_model.jpeg) **3.** ![](https://stanford.edu/~shervine/teaching/cs-230/illustrations/convolution-layer-a.png)<jupyter_code>http://cs231n.github.io/assets/conv-demo/index.html<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1542581681842528, 'fraction_numerical': 0.0433851098018211, 'mean_word_length': 4.801242236024844, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '606448', 'license': 'MIT', 'n_tokens_mistral': 749, 'n_tokens_neox': 688, 'n_words': 171, 'path': 'pixel_cnn.ipynb', 'repo_name': 'slesarev-hub/pixel-cnn', 'size': '1867'}