Giter VIP home page Giter VIP logo

Comments (3)

strawberrysparkle avatar strawberrysparkle commented on June 27, 2024 1

I'm struggling with the same error as well, if anyone has been able to resolve this in the meantime since the previous folks posted. :)

Update: I was able to resolve this error by adding the Theano flag cast_policy=numpy+floatX. The command that worked for me was THEANO_FLAGS='scan.allow_gc=True,device=cuda,floatX=float32,cast_policy=numpy+floatX' python alignDraw.py. Hope this helps someone else too!

from text2image.

YYlin avatar YYlin commented on June 27, 2024 1

when I python alignDraw.py THEANO_FLAGS='scan.allow_gc=True,device=cuda,floatX=float32,cast_policy=numpy+floatX',
I find there is same problem could you tell me why?
yulin@dlnlp01:~/gan_projects/text2image-master/coco$ python alignDraw.py models/coco-captions-32x32.json THEANO_FLAGS='scan.allow_gc=False,device=cuda,floatX=float32,cast_policy=numpy+floatX'
/home/yulin/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
building gradient function
0:00:13.788787
building train function
Traceback (most recent call last):
File "alignDraw.py", line 628, in
rvae.train(lr, epochs, save=save, validateAfter=validateAfter)
File "alignDraw.py", line 495, in train
self._build_train_function()
File "alignDraw.py", line 445, in _build_train_function
self._y: self.train_captions[self._index_cap, 0:self._cap_len]
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/compile/function.py", line 317, in function
output_keys=output_keys)
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/compile/pfunc.py", line 449, in pfunc
no_default_updates=no_default_updates)
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/compile/pfunc.py", line 219, in rebuild_collect_shared
cloned_v = clone_v_get_shared_updates(v, copy_inputs_over)
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/compile/pfunc.py", line 93, in clone_v_get_shared_updates
clone_v_get_shared_updates(i, copy_inputs_over)
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/compile/pfunc.py", line 93, in clone_v_get_shared_updates
clone_v_get_shared_updates(i, copy_inputs_over)
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/compile/pfunc.py", line 93, in clone_v_get_shared_updates
clone_v_get_shared_updates(i, copy_inputs_over)
[Previous line repeated 1 more times]
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/compile/pfunc.py", line 96, in clone_v_get_shared_updates
[clone_d[i] for i in owner.inputs], strict=rebuild_strict)
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/gof/graph.py", line 242, in clone_with_new_inputs
new_inputs[i] = curr.type.filter_variable(new)
File "/home/yulin/anaconda3/lib/python3.6/site-packages/theano/tensor/type.py", line 234, in filter_variable
self=self))
TypeError: Cannot convert Type TensorType(float32, matrix) (of Variable AdvancedSubtensor1.0) into Type TensorType(float64, matrix). You can try to manually convert AdvancedSubtensor1.0 into a TensorType(float64, matrix).

from text2image.

simplysimleprob avatar simplysimleprob commented on June 27, 2024

I have exactly same issue. No luck so far :(

from text2image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.