Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError: Cannot convert a symbolic Tensor (cond/rnn_2/Cast_2:0) to a numpy array #5

Open
Damanotra opened this issue Jan 20, 2021 · 0 comments

Comments

@Damanotra
Copy link

As the title said, that's my error

here is my error log

---------- Networks initialized -------------
[Network G] Total number of parameters : 54.414 M
-----------------------------------------------
Traceback (most recent call last):
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/tools/full_pipeline.py", line 71, in <module>
    main()
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/tools/full_pipeline.py", line 40, in main
    with GravesWriter() as writer:
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/graves.py", line 82, in __init__
    attention_mixture_components=10
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn.py", line 86, in __init__
    super(rnn, self).__init__(**kwargs)
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/tf_base_model.py", line 108, i
n __init__
    self.graph = self.build_graph()
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/tf_base_model.py", line 399, i
n build_graph
    self.loss = self.calculate_loss()
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn.py", line 205, in calculat
e_loss
    lambda: self.sample(cell)
  File "/home/tryan/miniconda2/envs/handwriting/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.
py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/tryan/miniconda2/envs/handwriting/lib/python3.7/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1224, in cond
    orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
  File "/home/tryan/miniconda2/envs/handwriting/lib/python3.7/site-packages/tensorflow_core/python/ops/control_flow$ops.py", line 1061, in BuildCondBranch
    original_result = fn()
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn.py", line 204, in <lambda>
    lambda: self.primed_sample(cell),
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn.py", line 163, in primed_s
ample
    scope='rnn'
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn_ops.py", line 247, in rnn_
free_run
    states, outputs, final_state = raw_rnn(cell, loop_fn, scope=scope)
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn_ops.py", line 45, in raw_r
nn
    init_loop_state) = loop_fn(time, None, None, None)
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn_ops.py", line 233, in loop
_fn
    cell.termination_condition(next_cell_state)
  File "/home/tryan/adam/spatio-temporal_handwriting_imitation/pipeline/../ext/graves/rnn_cell.py", line 158, in ter
mination_condition
    is_eos = tf.equal(es, np.ones_like(es))
  File "<__array_function__ internals>", line 6, in ones_like
  File "/home/tryan/miniconda2/envs/handwriting/lib/python3.7/site-packages/numpy/core/numeric.py", line 278, in one
s_like
    res = empty_like(a, dtype=dtype, order=order, subok=subok, shape=shape)
  File "<__array_function__ internals>", line 6, in empty_like
  File "/home/tryan/miniconda2/envs/handwriting/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py"
, line 736, in __array__
    " array.".format(self.name))
NotImplementedError: Cannot convert a symbolic Tensor (cond/rnn_2/Cast_2:0) to a numpy array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant