Skip to content

Type mismatch in generator network sequence_class_input #2

@tingtang2

Description

@tingtang2

Hello!

Thank you for releasing your project code, and especially the notebooks hosted on nbviewer!

When running Notebook 1: Engineering Splicing Isoforms (HEK) from the Alternative Splicing notebooks I get the following error:

ValueError: ``input_tensor.dtype`` differs from ``dtype``. Received: input_tensor.dtype=<dtype: 'float32'> but expected dtype=int32

With regards to line

sequence_class_input = Input(tensor=K.ones((batch_size, 1)), dtype='int32', name='sequence_class_seed')

Per the TF docs, K.ones in this case returns a tensor of dtype=tf.dtypes.float32. Changing the dtype for that Input from 'int32' to 'float32' fixed it for me. I can open a PR for that if you'd like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions