Giter VIP home page Giter VIP logo

Comments (2)

mansimov avatar mansimov commented on July 26, 2024

did you assign floatX flag to be equal to float32

from text2image.

SeekPoint avatar SeekPoint commented on July 26, 2024

sure

envy@ub1404:/os_pri/github/text2image$ THEANO_FLAGS='floatX=float32' python coco/alignDraw.py coco/models/coco-captions-32x32.json
Using gpu device 0: GeForce GTX 950M (CNMeM is disabled, CuDNN 4007)
coco/alignDraw.py:343: FutureWarning: comparison to None will result in an elementwise object comparison in the future.
if valData != None:
Traceback (most recent call last):
File "coco/alignDraw.py", line 617, in
rvae = ReccurentAttentionVAE(dimY, dimLangRNN, dimAlign, dimX, dimReadAttent, dimWriteAttent, dimRNNEnc, dimRNNDec, dimZ, runSteps, batch_size, reduceLRAfter, data, data_captions, valData=val_data, valDataCaptions=val_data_captions, pathToWeights=pathToWeights)
File "coco/alignDraw.py", line 355, in init
self._kl_final, self._logpxz, self._log_likelihood, self._c_ts, self._c_ts_gener, self._x, self._y, self._run_steps, self._updates_train, self._updates_gener, self._read_attent_params, self._write_attent_params, self._write_attent_params_gener, self._alphas_gener, self._params, self._mu_prior_t_gener, self._log_sigma_prior_t_gener = build_lang_encoder_and_attention_vae_decoder(self.dimY, self.dimLangRNN, self.dimAlign, self.dimX, self.dimReadAttent, self.dimWriteAttent, self.dimRNNEnc, self.dimRNNDec, self.dimZ, self.runSteps, self.pathToWeights)
File "coco/alignDraw.py", line 294, in build_lang_encoder_and_attention_vae_decoder
sequences=eps, outputs_info=[c0, h0_dec, cell0_dec, h0_enc, cell0_enc, kl_0, mu_prior_0, log_sigma_prior_0, None, None], non_sequences=all_params, n_steps=run_steps)
File "/home/envy/.local/lib/python2.7/site-packages/theano/scan_module/scan.py", line 1041, in scan
scan_outs = local_op(*scan_inputs)
File "/home/envy/.local/lib/python2.7/site-packages/theano/gof/op.py", line 611, in call
node = self.make_node(_inputs, *_kwargs)
File "/home/envy/.local/lib/python2.7/site-packages/theano/scan_module/scan_op.py", line 538, in make_node
inner_sitsot_out.type.dtype))
ValueError: When compiling the inner function of scan the following error has been encountered: The initial state (outputs_info in scan nomenclature) of variable IncSubtensor{Set;:int64:}.0 (argument number 1) has dtype float32, while the result of the inner function (fn) has dtype float64. This can happen if the inner function of scan results in an upcast or downcast.
envy@ub1404:
/os_pri/github/text2image$

but it works on mnist dataset like:
envy@ub1404:~/os_pri/github/text2image$ python mnist-captions/alignDraw.py mnist-captions/models/mnist-captions.json
Using gpu device 0: GeForce GTX 950M (CNMeM is disabled, CuDNN 4007)
(50000, 784) (50000,) (10000, 784) (10000,)
Banned configurations are :
[5, 1, 2, 8, 0, 3, 3, 10, 9, 0, 0, 4]
Train Dataset
(10000, 3600) (10000, 12) [1176, 1140, 1193, 1317, 1288, 1274, 1331, 1281]
mnist-captions/alignDraw.py:337: FutureWarning: comparison to None will result in an elementwise object comparison in the future.
if valData != None:
Val Dataset
(10000, 3600) (10000, 12) [1101, 1153, 1229, 1316, 1228, 1332, 1314, 1327]
building gradient function
0:00:12.684201
building train function
0:10:49.556639
Epoch 0 took 0:15:29.012441
Train Results
22.5236268711 1385.53319336 1408.0568158
Validation Results
building validate function
0:00:29.504751
20.0507067261 1111.01946533 1131.07016968

Recreated Train Dataset
[1161, 1189, 1130, 1333, 1282, 1294, 1300, 1311]

Epoch 1 took 0:14:09.783145
Train Results
13.5244888062 748.785505981 762.309996948
Recreated Train Dataset
[1154, 1133, 1218, 1289, 1294, 1264, 1341, 1307]

Epoch 2 took 0:13:24.739994
Train Results
25.99415979 627.837939148 653.832095032
Recreated Train Dataset
[1168, 1218, 1116, 1261, 1332, 1273, 1276, 1356]

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.