Required inputs for Akita are:
First, make sure you have a FASTA file available consistent with genome used for the coolers. Either add a symlink for a the data directory or download the machine learning friendly simplified version in the next cell.
In [3]:
import os, subprocess, json
if not os.path.isfile('./data/hg38.ml.fa'):
print('downloading hg38.ml.fa')
subprocess.call('curl -o ./data/hg38.ml.fa.gz https://storage.googleapis.com/basenji_barnyard/hg38.ml.fa.gz', shell=True)
subprocess.call('gunzip ./data/hg38.ml.fa.gz', shell=True)
Download a few Micro-C datasets, processed using distiller (https://github.com/mirnylab/distiller-nf), binned to 2048bp, and iteratively corrected.
In [4]:
if not os.path.exists('./data/coolers'):
os.mkdir('./data/coolers')
if not os.path.isfile('./data/coolers/HFF_hg38_4DNFIP5EUOFX.mapq_30.2048.cool'):
subprocess.call('curl -o ./data/coolers/HFF_hg38_4DNFIP5EUOFX.mapq_30.2048.cool'+
' https://storage.googleapis.com/basenji_hic/tutorials/coolers/HFF_hg38_4DNFIP5EUOFX.mapq_30.2048.cool', shell=True)
subprocess.call('curl -o ./data/coolers/H1hESC_hg38_4DNFI1O6IL1Q.mapq_30.2048.cool'+
' https://storage.googleapis.com/basenji_hic/tutorials/coolers/H1hESC_hg38_4DNFI1O6IL1Q.mapq_30.2048.cool', shell=True)
In [5]:
ls ./data/coolers/
H1hESC_hg38_4DNFI1O6IL1Q.mapq_30.2048.cool
HFF_hg38_4DNFIP5EUOFX.mapq_30.2048.cool
Write out these cooler files and labels to a samples table.
In [6]:
lines = [['index','identifier','file','clip','sum_stat','description']]
lines.append(['0', 'HFF', './data/coolers/HFF_hg38_4DNFIP5EUOFX.mapq_30.2048.cool', '2', 'sum', 'HFF'])
lines.append(['1', 'H1hESC', './data/coolers/H1hESC_hg38_4DNFI1O6IL1Q.mapq_30.2048.cool', '2', 'sum', 'H1hESC'])
samples_out = open('data/microc_cools.txt', 'w')
for line in lines:
print('\t'.join(line), file=samples_out)
samples_out.close()
Next, we want to choose genomic sequences to form batches for stochastic gradient descent, divide them into training/validation/test sets, and construct TFRecords to provide to downstream programs.
The script akita_data.py implements this procedure.
The most relevant options here are:
Option/Argument | Value | Note |
---|---|---|
--sample | 0.1 | Down-sample the genome to 10% to speed things up here. |
-g | data/hg38_gaps_binsize2048_numconseq10.bed | Dodge large-scale unmappable regions determined from filtered cooler bins. |
-l | 1048576 | Sequence length. |
--crop | 65536 | Crop edges of matrix so loss is only computed over the central region. |
--local | True | Run locally, as opposed to on a SLURM scheduler. |
-o | data/1m | Output directory |
-p | 8 | Uses multiple concourrent processes to read/write. |
-t | .1 | Hold out 10% sequences for testing. |
-v | .1 | Hold out 10% sequences for validation. |
-w | 2048 | Pool the nucleotide-resolution values to 2048 bp bins. |
fasta_file | data/hg38.ml.fa | FASTA file to extract sequences from. |
targets_file | data/microc_cools.txt | Target table with cooler paths. |
Note: make sure to export BASENJIDIR as outlined in the basenji installation tips (https://github.com/calico/basenji/tree/master/#installation).
In [19]:
! akita_data.py --sample 0.05 -g ./data/hg38_gaps_binsize2048_numconseq10.bed -l 1048576 --crop 65536 --local -o ./data/1m --as_obsexp -p 8 -t .1 -v .1 -w 2048 --snap 2048 --stride_train 262144 --stride_test 32768 ./data/hg38.ml.fa ./data/microc_cools.txt
Contigs divided into
Train: 413 contigs, 2078450861 nt (0.8036)
Valid: 47 contigs, 254228224 nt (0.0983)
Test: 48 contigs, 253678336 nt (0.0981)
writing sequences to BED
akita_data_read.py --crop 65536 -k 0 -w 2048 --clip 2.000000 --as_obsexp ./data/coolers/HFF_hg38_4DNFIP5EUOFX.mapq_30.2048.cool ./data/1m/sequences.bed ./data/1m/seqs_cov/0.h5
akita_data_read.py --crop 65536 -k 0 -w 2048 --clip 2.000000 --as_obsexp ./data/coolers/H1hESC_hg38_4DNFI1O6IL1Q.mapq_30.2048.cool ./data/1m/sequences.bed ./data/1m/seqs_cov/1.h5
/Users/drk/opt/anaconda3/lib/python3.7/site-packages/cooltools/lib/numutils.py:1317: RuntimeWarning: invalid value encountered in true_divide
val_cur = ar_cur / armask_cur
/Users/drk/opt/anaconda3/lib/python3.7/site-packages/cooltools/lib/numutils.py:1317: RuntimeWarning: invalid value encountered in true_divide
val_cur = ar_cur / armask_cur
/Users/drk/opt/anaconda3/lib/python3.7/site-packages/cooltools/lib/numutils.py:1317: RuntimeWarning: invalid value encountered in true_divide
val_cur = ar_cur / armask_cur
/Users/drk/opt/anaconda3/lib/python3.7/site-packages/cooltools/lib/numutils.py:1317: RuntimeWarning: invalid value encountered in true_divide
val_cur = ar_cur / armask_cur
basenji_data_write.py -s 0 -e 128 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/train-0.tfr
basenji_data_write.py -s 128 -e 256 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/train-1.tfr
basenji_data_write.py -s 256 -e 350 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/train-2.tfr
basenji_data_write.py -s 350 -e 478 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/valid-0.tfr
basenji_data_write.py -s 478 -e 606 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/valid-1.tfr
basenji_data_write.py -s 606 -e 666 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/valid-2.tfr
basenji_data_write.py -s 666 -e 794 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/test-0.tfr
basenji_data_write.py -s 794 -e 922 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/test-1.tfr
basenji_data_write.py -s 922 -e 980 ./data/hg38.ml.fa ./data/1m/sequences.bed ./data/1m/seqs_cov ./data/1m/tfrecords/test-2.tfr
The data for training is now saved in data/1m as tfrecords (for training, validation, and testing), where contigs.bed contains the original large contiguous regions from which training sequences were taken, and sequences.bed contains the train/valid/test sequences.
In [20]:
! cut -f4 data/1m/sequences.bed | sort | uniq -c
314 test
350 train
316 valid
In [21]:
! head -n3 data/1m/sequences.bed
chr2 183353344 184401920 train
chr3 120852480 121901056 train
chr16 12914688 13963264 train
Now train a model!
(Note: for training production-level models, please remove the --sample option when generating tfrecords)
In [22]:
# specify model parameters json to have only two targets
params_file = './params.json'
with open(params_file) as params_file:
params_tutorial = json.load(params_file)
params_tutorial['model']['head_hic'][-1]['units'] =2
with open('./data/1m/params_tutorial.json','w') as params_tutorial_file:
json.dump(params_tutorial,params_tutorial_file)
### note that training with default parameters requires GPU with >12Gb RAM ###
In [ ]:
!akita_train.py -o ./data/1m/train_out/ ./data/1m/params_tutorial.json ./data/1m/
2020-06-12 12:52:23.943408: I tensorflow/core/platform/cpu_feature_guard.cc:145] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags.
2020-06-12 12:52:23.944242: I tensorflow/core/common_runtime/process_util.cc:115] Creating new thread pool with default inter op setting: 16. Tune using inter_op_parallelism_threads for best performance.
./data/1m//tfrecords/train-*.tfr has 350 sequences with 2/2 targets
./data/1m//tfrecords/valid-*.tfr has 316 sequences with 2/2 targets
Model: "model_1"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
sequence (InputLayer) [(None, 1048576, 4)] 0
__________________________________________________________________________________________________
stochastic_reverse_complement ( ((None, 1048576, 4), 0 sequence[0][0]
__________________________________________________________________________________________________
stochastic_shift (StochasticShi (None, 1048576, 4) 0 stochastic_reverse_complement[0][
__________________________________________________________________________________________________
re_lu (ReLU) (None, 1048576, 4) 0 stochastic_shift[0][0]
__________________________________________________________________________________________________
conv1d (Conv1D) (None, 1048576, 96) 4224 re_lu[0][0]
__________________________________________________________________________________________________
batch_normalization (BatchNorma (None, 1048576, 96) 384 conv1d[0][0]
__________________________________________________________________________________________________
max_pooling1d (MaxPooling1D) (None, 524288, 96) 0 batch_normalization[0][0]
__________________________________________________________________________________________________
re_lu_1 (ReLU) (None, 524288, 96) 0 max_pooling1d[0][0]
__________________________________________________________________________________________________
conv1d_1 (Conv1D) (None, 524288, 96) 46080 re_lu_1[0][0]
__________________________________________________________________________________________________
batch_normalization_1 (BatchNor (None, 524288, 96) 384 conv1d_1[0][0]
__________________________________________________________________________________________________
max_pooling1d_1 (MaxPooling1D) (None, 262144, 96) 0 batch_normalization_1[0][0]
__________________________________________________________________________________________________
re_lu_2 (ReLU) (None, 262144, 96) 0 max_pooling1d_1[0][0]
__________________________________________________________________________________________________
conv1d_2 (Conv1D) (None, 262144, 96) 46080 re_lu_2[0][0]
__________________________________________________________________________________________________
batch_normalization_2 (BatchNor (None, 262144, 96) 384 conv1d_2[0][0]
__________________________________________________________________________________________________
max_pooling1d_2 (MaxPooling1D) (None, 131072, 96) 0 batch_normalization_2[0][0]
__________________________________________________________________________________________________
re_lu_3 (ReLU) (None, 131072, 96) 0 max_pooling1d_2[0][0]
__________________________________________________________________________________________________
conv1d_3 (Conv1D) (None, 131072, 96) 46080 re_lu_3[0][0]
__________________________________________________________________________________________________
batch_normalization_3 (BatchNor (None, 131072, 96) 384 conv1d_3[0][0]
__________________________________________________________________________________________________
max_pooling1d_3 (MaxPooling1D) (None, 65536, 96) 0 batch_normalization_3[0][0]
__________________________________________________________________________________________________
re_lu_4 (ReLU) (None, 65536, 96) 0 max_pooling1d_3[0][0]
__________________________________________________________________________________________________
conv1d_4 (Conv1D) (None, 65536, 96) 46080 re_lu_4[0][0]
__________________________________________________________________________________________________
batch_normalization_4 (BatchNor (None, 65536, 96) 384 conv1d_4[0][0]
__________________________________________________________________________________________________
max_pooling1d_4 (MaxPooling1D) (None, 32768, 96) 0 batch_normalization_4[0][0]
__________________________________________________________________________________________________
re_lu_5 (ReLU) (None, 32768, 96) 0 max_pooling1d_4[0][0]
__________________________________________________________________________________________________
conv1d_5 (Conv1D) (None, 32768, 96) 46080 re_lu_5[0][0]
__________________________________________________________________________________________________
batch_normalization_5 (BatchNor (None, 32768, 96) 384 conv1d_5[0][0]
__________________________________________________________________________________________________
max_pooling1d_5 (MaxPooling1D) (None, 16384, 96) 0 batch_normalization_5[0][0]
__________________________________________________________________________________________________
re_lu_6 (ReLU) (None, 16384, 96) 0 max_pooling1d_5[0][0]
__________________________________________________________________________________________________
conv1d_6 (Conv1D) (None, 16384, 96) 46080 re_lu_6[0][0]
__________________________________________________________________________________________________
batch_normalization_6 (BatchNor (None, 16384, 96) 384 conv1d_6[0][0]
__________________________________________________________________________________________________
max_pooling1d_6 (MaxPooling1D) (None, 8192, 96) 0 batch_normalization_6[0][0]
__________________________________________________________________________________________________
re_lu_7 (ReLU) (None, 8192, 96) 0 max_pooling1d_6[0][0]
__________________________________________________________________________________________________
conv1d_7 (Conv1D) (None, 8192, 96) 46080 re_lu_7[0][0]
__________________________________________________________________________________________________
batch_normalization_7 (BatchNor (None, 8192, 96) 384 conv1d_7[0][0]
__________________________________________________________________________________________________
max_pooling1d_7 (MaxPooling1D) (None, 4096, 96) 0 batch_normalization_7[0][0]
__________________________________________________________________________________________________
re_lu_8 (ReLU) (None, 4096, 96) 0 max_pooling1d_7[0][0]
__________________________________________________________________________________________________
conv1d_8 (Conv1D) (None, 4096, 96) 46080 re_lu_8[0][0]
__________________________________________________________________________________________________
batch_normalization_8 (BatchNor (None, 4096, 96) 384 conv1d_8[0][0]
__________________________________________________________________________________________________
max_pooling1d_8 (MaxPooling1D) (None, 2048, 96) 0 batch_normalization_8[0][0]
__________________________________________________________________________________________________
re_lu_9 (ReLU) (None, 2048, 96) 0 max_pooling1d_8[0][0]
__________________________________________________________________________________________________
conv1d_9 (Conv1D) (None, 2048, 96) 46080 re_lu_9[0][0]
__________________________________________________________________________________________________
batch_normalization_9 (BatchNor (None, 2048, 96) 384 conv1d_9[0][0]
__________________________________________________________________________________________________
max_pooling1d_9 (MaxPooling1D) (None, 1024, 96) 0 batch_normalization_9[0][0]
__________________________________________________________________________________________________
re_lu_10 (ReLU) (None, 1024, 96) 0 max_pooling1d_9[0][0]
__________________________________________________________________________________________________
conv1d_10 (Conv1D) (None, 1024, 96) 46080 re_lu_10[0][0]
__________________________________________________________________________________________________
batch_normalization_10 (BatchNo (None, 1024, 96) 384 conv1d_10[0][0]
__________________________________________________________________________________________________
max_pooling1d_10 (MaxPooling1D) (None, 512, 96) 0 batch_normalization_10[0][0]
__________________________________________________________________________________________________
re_lu_11 (ReLU) (None, 512, 96) 0 max_pooling1d_10[0][0]
__________________________________________________________________________________________________
conv1d_11 (Conv1D) (None, 512, 48) 13824 re_lu_11[0][0]
__________________________________________________________________________________________________
batch_normalization_11 (BatchNo (None, 512, 48) 192 conv1d_11[0][0]
__________________________________________________________________________________________________
re_lu_12 (ReLU) (None, 512, 48) 0 batch_normalization_11[0][0]
__________________________________________________________________________________________________
conv1d_12 (Conv1D) (None, 512, 96) 4608 re_lu_12[0][0]
__________________________________________________________________________________________________
batch_normalization_12 (BatchNo (None, 512, 96) 384 conv1d_12[0][0]
__________________________________________________________________________________________________
dropout (Dropout) (None, 512, 96) 0 batch_normalization_12[0][0]
__________________________________________________________________________________________________
add (Add) (None, 512, 96) 0 max_pooling1d_10[0][0]
dropout[0][0]
__________________________________________________________________________________________________
re_lu_13 (ReLU) (None, 512, 96) 0 add[0][0]
__________________________________________________________________________________________________
conv1d_13 (Conv1D) (None, 512, 48) 13824 re_lu_13[0][0]
__________________________________________________________________________________________________
batch_normalization_13 (BatchNo (None, 512, 48) 192 conv1d_13[0][0]
__________________________________________________________________________________________________
re_lu_14 (ReLU) (None, 512, 48) 0 batch_normalization_13[0][0]
__________________________________________________________________________________________________
conv1d_14 (Conv1D) (None, 512, 96) 4608 re_lu_14[0][0]
__________________________________________________________________________________________________
batch_normalization_14 (BatchNo (None, 512, 96) 384 conv1d_14[0][0]
__________________________________________________________________________________________________
dropout_1 (Dropout) (None, 512, 96) 0 batch_normalization_14[0][0]
__________________________________________________________________________________________________
add_1 (Add) (None, 512, 96) 0 add[0][0]
dropout_1[0][0]
__________________________________________________________________________________________________
re_lu_15 (ReLU) (None, 512, 96) 0 add_1[0][0]
__________________________________________________________________________________________________
conv1d_15 (Conv1D) (None, 512, 48) 13824 re_lu_15[0][0]
__________________________________________________________________________________________________
batch_normalization_15 (BatchNo (None, 512, 48) 192 conv1d_15[0][0]
__________________________________________________________________________________________________
re_lu_16 (ReLU) (None, 512, 48) 0 batch_normalization_15[0][0]
__________________________________________________________________________________________________
conv1d_16 (Conv1D) (None, 512, 96) 4608 re_lu_16[0][0]
__________________________________________________________________________________________________
batch_normalization_16 (BatchNo (None, 512, 96) 384 conv1d_16[0][0]
__________________________________________________________________________________________________
dropout_2 (Dropout) (None, 512, 96) 0 batch_normalization_16[0][0]
__________________________________________________________________________________________________
add_2 (Add) (None, 512, 96) 0 add_1[0][0]
dropout_2[0][0]
__________________________________________________________________________________________________
re_lu_17 (ReLU) (None, 512, 96) 0 add_2[0][0]
__________________________________________________________________________________________________
conv1d_17 (Conv1D) (None, 512, 48) 13824 re_lu_17[0][0]
__________________________________________________________________________________________________
batch_normalization_17 (BatchNo (None, 512, 48) 192 conv1d_17[0][0]
__________________________________________________________________________________________________
re_lu_18 (ReLU) (None, 512, 48) 0 batch_normalization_17[0][0]
__________________________________________________________________________________________________
conv1d_18 (Conv1D) (None, 512, 96) 4608 re_lu_18[0][0]
__________________________________________________________________________________________________
batch_normalization_18 (BatchNo (None, 512, 96) 384 conv1d_18[0][0]
__________________________________________________________________________________________________
dropout_3 (Dropout) (None, 512, 96) 0 batch_normalization_18[0][0]
__________________________________________________________________________________________________
add_3 (Add) (None, 512, 96) 0 add_2[0][0]
dropout_3[0][0]
__________________________________________________________________________________________________
re_lu_19 (ReLU) (None, 512, 96) 0 add_3[0][0]
__________________________________________________________________________________________________
conv1d_19 (Conv1D) (None, 512, 48) 13824 re_lu_19[0][0]
__________________________________________________________________________________________________
batch_normalization_19 (BatchNo (None, 512, 48) 192 conv1d_19[0][0]
__________________________________________________________________________________________________
re_lu_20 (ReLU) (None, 512, 48) 0 batch_normalization_19[0][0]
__________________________________________________________________________________________________
conv1d_20 (Conv1D) (None, 512, 96) 4608 re_lu_20[0][0]
__________________________________________________________________________________________________
batch_normalization_20 (BatchNo (None, 512, 96) 384 conv1d_20[0][0]
__________________________________________________________________________________________________
dropout_4 (Dropout) (None, 512, 96) 0 batch_normalization_20[0][0]
__________________________________________________________________________________________________
add_4 (Add) (None, 512, 96) 0 add_3[0][0]
dropout_4[0][0]
__________________________________________________________________________________________________
re_lu_21 (ReLU) (None, 512, 96) 0 add_4[0][0]
__________________________________________________________________________________________________
conv1d_21 (Conv1D) (None, 512, 48) 13824 re_lu_21[0][0]
__________________________________________________________________________________________________
batch_normalization_21 (BatchNo (None, 512, 48) 192 conv1d_21[0][0]
__________________________________________________________________________________________________
re_lu_22 (ReLU) (None, 512, 48) 0 batch_normalization_21[0][0]
__________________________________________________________________________________________________
conv1d_22 (Conv1D) (None, 512, 96) 4608 re_lu_22[0][0]
__________________________________________________________________________________________________
batch_normalization_22 (BatchNo (None, 512, 96) 384 conv1d_22[0][0]
__________________________________________________________________________________________________
dropout_5 (Dropout) (None, 512, 96) 0 batch_normalization_22[0][0]
__________________________________________________________________________________________________
add_5 (Add) (None, 512, 96) 0 add_4[0][0]
dropout_5[0][0]
__________________________________________________________________________________________________
re_lu_23 (ReLU) (None, 512, 96) 0 add_5[0][0]
__________________________________________________________________________________________________
conv1d_23 (Conv1D) (None, 512, 48) 13824 re_lu_23[0][0]
__________________________________________________________________________________________________
batch_normalization_23 (BatchNo (None, 512, 48) 192 conv1d_23[0][0]
__________________________________________________________________________________________________
re_lu_24 (ReLU) (None, 512, 48) 0 batch_normalization_23[0][0]
__________________________________________________________________________________________________
conv1d_24 (Conv1D) (None, 512, 96) 4608 re_lu_24[0][0]
__________________________________________________________________________________________________
batch_normalization_24 (BatchNo (None, 512, 96) 384 conv1d_24[0][0]
__________________________________________________________________________________________________
dropout_6 (Dropout) (None, 512, 96) 0 batch_normalization_24[0][0]
__________________________________________________________________________________________________
add_6 (Add) (None, 512, 96) 0 add_5[0][0]
dropout_6[0][0]
__________________________________________________________________________________________________
re_lu_25 (ReLU) (None, 512, 96) 0 add_6[0][0]
__________________________________________________________________________________________________
conv1d_25 (Conv1D) (None, 512, 48) 13824 re_lu_25[0][0]
__________________________________________________________________________________________________
batch_normalization_25 (BatchNo (None, 512, 48) 192 conv1d_25[0][0]
__________________________________________________________________________________________________
re_lu_26 (ReLU) (None, 512, 48) 0 batch_normalization_25[0][0]
__________________________________________________________________________________________________
conv1d_26 (Conv1D) (None, 512, 96) 4608 re_lu_26[0][0]
__________________________________________________________________________________________________
batch_normalization_26 (BatchNo (None, 512, 96) 384 conv1d_26[0][0]
__________________________________________________________________________________________________
dropout_7 (Dropout) (None, 512, 96) 0 batch_normalization_26[0][0]
__________________________________________________________________________________________________
add_7 (Add) (None, 512, 96) 0 add_6[0][0]
dropout_7[0][0]
__________________________________________________________________________________________________
re_lu_27 (ReLU) (None, 512, 96) 0 add_7[0][0]
__________________________________________________________________________________________________
conv1d_27 (Conv1D) (None, 512, 64) 30720 re_lu_27[0][0]
__________________________________________________________________________________________________
batch_normalization_27 (BatchNo (None, 512, 64) 256 conv1d_27[0][0]
__________________________________________________________________________________________________
re_lu_28 (ReLU) (None, 512, 64) 0 batch_normalization_27[0][0]
__________________________________________________________________________________________________
one_to_two (OneToTwo) (None, 512, 512, 64) 0 re_lu_28[0][0]
__________________________________________________________________________________________________
concat_dist2d (ConcatDist2D) (None, 512, 512, 65) 0 one_to_two[0][0]
__________________________________________________________________________________________________
re_lu_29 (ReLU) (None, 512, 512, 65) 0 concat_dist2d[0][0]
__________________________________________________________________________________________________
conv2d (Conv2D) (None, 512, 512, 48) 28080 re_lu_29[0][0]
__________________________________________________________________________________________________
batch_normalization_28 (BatchNo (None, 512, 512, 48) 192 conv2d[0][0]
__________________________________________________________________________________________________
symmetrize2d (Symmetrize2D) (None, 512, 512, 48) 0 batch_normalization_28[0][0]
__________________________________________________________________________________________________
re_lu_30 (ReLU) (None, 512, 512, 48) 0 symmetrize2d[0][0]
__________________________________________________________________________________________________
conv2d_1 (Conv2D) (None, 512, 512, 24) 10368 re_lu_30[0][0]
__________________________________________________________________________________________________
batch_normalization_29 (BatchNo (None, 512, 512, 24) 96 conv2d_1[0][0]
__________________________________________________________________________________________________
re_lu_31 (ReLU) (None, 512, 512, 24) 0 batch_normalization_29[0][0]
__________________________________________________________________________________________________
conv2d_2 (Conv2D) (None, 512, 512, 48) 1152 re_lu_31[0][0]
__________________________________________________________________________________________________
batch_normalization_30 (BatchNo (None, 512, 512, 48) 192 conv2d_2[0][0]
__________________________________________________________________________________________________
dropout_8 (Dropout) (None, 512, 512, 48) 0 batch_normalization_30[0][0]
__________________________________________________________________________________________________
add_8 (Add) (None, 512, 512, 48) 0 symmetrize2d[0][0]
dropout_8[0][0]
__________________________________________________________________________________________________
symmetrize2d_1 (Symmetrize2D) (None, 512, 512, 48) 0 add_8[0][0]
__________________________________________________________________________________________________
re_lu_32 (ReLU) (None, 512, 512, 48) 0 symmetrize2d_1[0][0]
__________________________________________________________________________________________________
conv2d_3 (Conv2D) (None, 512, 512, 24) 10368 re_lu_32[0][0]
__________________________________________________________________________________________________
batch_normalization_31 (BatchNo (None, 512, 512, 24) 96 conv2d_3[0][0]
__________________________________________________________________________________________________
re_lu_33 (ReLU) (None, 512, 512, 24) 0 batch_normalization_31[0][0]
__________________________________________________________________________________________________
conv2d_4 (Conv2D) (None, 512, 512, 48) 1152 re_lu_33[0][0]
__________________________________________________________________________________________________
batch_normalization_32 (BatchNo (None, 512, 512, 48) 192 conv2d_4[0][0]
__________________________________________________________________________________________________
dropout_9 (Dropout) (None, 512, 512, 48) 0 batch_normalization_32[0][0]
__________________________________________________________________________________________________
add_9 (Add) (None, 512, 512, 48) 0 symmetrize2d_1[0][0]
dropout_9[0][0]
__________________________________________________________________________________________________
symmetrize2d_2 (Symmetrize2D) (None, 512, 512, 48) 0 add_9[0][0]
__________________________________________________________________________________________________
re_lu_34 (ReLU) (None, 512, 512, 48) 0 symmetrize2d_2[0][0]
__________________________________________________________________________________________________
conv2d_5 (Conv2D) (None, 512, 512, 24) 10368 re_lu_34[0][0]
__________________________________________________________________________________________________
batch_normalization_33 (BatchNo (None, 512, 512, 24) 96 conv2d_5[0][0]
__________________________________________________________________________________________________
re_lu_35 (ReLU) (None, 512, 512, 24) 0 batch_normalization_33[0][0]
__________________________________________________________________________________________________
conv2d_6 (Conv2D) (None, 512, 512, 48) 1152 re_lu_35[0][0]
__________________________________________________________________________________________________
batch_normalization_34 (BatchNo (None, 512, 512, 48) 192 conv2d_6[0][0]
__________________________________________________________________________________________________
dropout_10 (Dropout) (None, 512, 512, 48) 0 batch_normalization_34[0][0]
__________________________________________________________________________________________________
add_10 (Add) (None, 512, 512, 48) 0 symmetrize2d_2[0][0]
dropout_10[0][0]
__________________________________________________________________________________________________
symmetrize2d_3 (Symmetrize2D) (None, 512, 512, 48) 0 add_10[0][0]
__________________________________________________________________________________________________
re_lu_36 (ReLU) (None, 512, 512, 48) 0 symmetrize2d_3[0][0]
__________________________________________________________________________________________________
conv2d_7 (Conv2D) (None, 512, 512, 24) 10368 re_lu_36[0][0]
__________________________________________________________________________________________________
batch_normalization_35 (BatchNo (None, 512, 512, 24) 96 conv2d_7[0][0]
__________________________________________________________________________________________________
re_lu_37 (ReLU) (None, 512, 512, 24) 0 batch_normalization_35[0][0]
__________________________________________________________________________________________________
conv2d_8 (Conv2D) (None, 512, 512, 48) 1152 re_lu_37[0][0]
__________________________________________________________________________________________________
batch_normalization_36 (BatchNo (None, 512, 512, 48) 192 conv2d_8[0][0]
__________________________________________________________________________________________________
dropout_11 (Dropout) (None, 512, 512, 48) 0 batch_normalization_36[0][0]
__________________________________________________________________________________________________
add_11 (Add) (None, 512, 512, 48) 0 symmetrize2d_3[0][0]
dropout_11[0][0]
__________________________________________________________________________________________________
symmetrize2d_4 (Symmetrize2D) (None, 512, 512, 48) 0 add_11[0][0]
__________________________________________________________________________________________________
re_lu_38 (ReLU) (None, 512, 512, 48) 0 symmetrize2d_4[0][0]
__________________________________________________________________________________________________
conv2d_9 (Conv2D) (None, 512, 512, 24) 10368 re_lu_38[0][0]
__________________________________________________________________________________________________
batch_normalization_37 (BatchNo (None, 512, 512, 24) 96 conv2d_9[0][0]
__________________________________________________________________________________________________
re_lu_39 (ReLU) (None, 512, 512, 24) 0 batch_normalization_37[0][0]
__________________________________________________________________________________________________
conv2d_10 (Conv2D) (None, 512, 512, 48) 1152 re_lu_39[0][0]
__________________________________________________________________________________________________
batch_normalization_38 (BatchNo (None, 512, 512, 48) 192 conv2d_10[0][0]
__________________________________________________________________________________________________
dropout_12 (Dropout) (None, 512, 512, 48) 0 batch_normalization_38[0][0]
__________________________________________________________________________________________________
add_12 (Add) (None, 512, 512, 48) 0 symmetrize2d_4[0][0]
dropout_12[0][0]
__________________________________________________________________________________________________
symmetrize2d_5 (Symmetrize2D) (None, 512, 512, 48) 0 add_12[0][0]
__________________________________________________________________________________________________
re_lu_40 (ReLU) (None, 512, 512, 48) 0 symmetrize2d_5[0][0]
__________________________________________________________________________________________________
conv2d_11 (Conv2D) (None, 512, 512, 24) 10368 re_lu_40[0][0]
__________________________________________________________________________________________________
batch_normalization_39 (BatchNo (None, 512, 512, 24) 96 conv2d_11[0][0]
__________________________________________________________________________________________________
re_lu_41 (ReLU) (None, 512, 512, 24) 0 batch_normalization_39[0][0]
__________________________________________________________________________________________________
conv2d_12 (Conv2D) (None, 512, 512, 48) 1152 re_lu_41[0][0]
__________________________________________________________________________________________________
batch_normalization_40 (BatchNo (None, 512, 512, 48) 192 conv2d_12[0][0]
__________________________________________________________________________________________________
dropout_13 (Dropout) (None, 512, 512, 48) 0 batch_normalization_40[0][0]
__________________________________________________________________________________________________
add_13 (Add) (None, 512, 512, 48) 0 symmetrize2d_5[0][0]
dropout_13[0][0]
__________________________________________________________________________________________________
symmetrize2d_6 (Symmetrize2D) (None, 512, 512, 48) 0 add_13[0][0]
__________________________________________________________________________________________________
cropping2d (Cropping2D) (None, 448, 448, 48) 0 symmetrize2d_6[0][0]
__________________________________________________________________________________________________
upper_tri (UpperTri) (None, 99681, 48) 0 cropping2d[0][0]
__________________________________________________________________________________________________
dense (Dense) (None, 99681, 2) 98 upper_tri[0][0]
__________________________________________________________________________________________________
switch_reverse_triu (SwitchReve (None, 99681, 2) 0 dense[0][0]
stochastic_reverse_complement[0][
==================================================================================================
Total params: 751,506
Trainable params: 746,002
Non-trainable params: 5,504
__________________________________________________________________________________________________
None
model_strides [2048]
target_lengths [99681]
target_crops [-49585]
Train for 175 steps, validate for 158 steps
Epoch 1/10000
2020-06-12 12:53:41.400307: I tensorflow/core/profiler/lib/profiler_session.cc:205] Profiler session started.
11/175 [>.............................] - ETA: 1:37:07 - loss: 0.6840 - pearsonr: -0.0139 - r2: -1.0572
See explore_model.ipynb for tips on investigating the output of a trained model.
Content source: calico/basenji
Similar notebooks: