Closed rbharath closed 6 years ago
@rbharath Your summary is spot on. For keras 0.3.3, the default image format should be th
which uses channels first. For a more recent keras, this needs to be set. Would be good to clarify this in the installation instructions or configuring this as part of the installation.
Ah, I see. Thanks for the clarification!
I've been working on porting the dragonn tutorial over to deepchem (https://github.com/deepchem/deepchem/pull/979) and have run into a couple basic issues about shapes and convolutions.
At the first layer, the
SequenceDNN
performs akeras.layers.Conv2D(nb_filter=1, nb_row=4, nb_col=15)
(assumingconv_width
of 15 andnb_filter=1
). The training data generated in the tutorial forms an array of shape(n_samples, 1, 4, 1000)
(assumingseq_length=1000
). I think what's happening is that the genome is being viewed as an image of shape(4, 1000)
with 1 channel, and the convolution of shape(4,15)
is moved over this image.Is this summary right? If so, is the
image_data_format
option in Keras set tochannels_first
somewhere to account for the data channel being before the width/height in the array shape?