Skip to content

Typrerror when running joint-Model_test.py #16

@HeJunhong1107

Description

@HeJunhong1107

I'm trying to use deep affinity with pretained error, but the error appeared :

Tokenizing data in ./data/test_sps
Tokenizing data in ./data/test_smile
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 491, in apply_op
preferred_dtype=default_dtype)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 704, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 577, in _TensorTensorConversionFunction
% (dtype.name, t.dtype.name, str(t)))
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("GRU/GRU/GRUCell/Gates/add:0", shape=(64, 512), dtype=float32)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "joint-Model_test.py", line 230, in
prot_gru_1 = tflearn.gru(prot_embd, GRU_size_prot,initial_state= prot_init_state_1,trainable=True,return_seq=True,restore=True)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tflearn/layers/recurrent.py", line 294, in gru
scope=scope, name=name)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tflearn/layers/recurrent.py", line 67, in rnn_template
sequence_length=sequence_length)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn.py", line 197, in static_rnn
(output, state) = call_cell()
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn.py", line 184, in
call_cell = lambda: cell(input
, state)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tflearn/layers/recurrent.py", line 601, in call
self.trainable, self.restore, self.reuse))
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1198, in split
split_dim=axis, num_split=num_or_size_splits, value=value, name=name)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3306, in _split
num_split=num_split, name=name)
File "/home/recher/anaconda3/envs/deep_affinity/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 514, in apply_op
(prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.

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