Coder Social home page Coder Social logo

Keras versioning error about tybalt HOT 3 CLOSED

ajlee21 avatar ajlee21 commented on June 1, 2024
Keras versioning error

from tybalt.

Comments (3)

gwaybio avatar gwaybio commented on June 1, 2024

Thanks @ajlee21 - if possible, can you post the error here?

Tybalt currently uses Keras 2.0.6 and tensorflow 1.0.1 but its probably time for an update and for this to be fixed.

from tybalt.

ajlee21 avatar ajlee21 commented on June 1, 2024

Using TensorFlow backend.
/home/alexandra/anaconda2/envs/python3/lib/python3.6/site-packages/ipykernel_launcher.py:135: UserWarning: Output "custom_variational_layer_1" missing from loss dictionary. We assume this was done on purpose, and we will not be expecting any data to be passed to "custom_variational_layer_1" during training.


ValueError Traceback (most recent call last)
in ()
139 hist = vae.fit(np.array(rnaseq_train_df), shuffle=True, epochs=epochs, batch_size=batch_size,
140 validation_data=(np.array(rnaseq_test_df), np.array(rnaseq_test_df)),
--> 141 callbacks=[WarmUpCallback(beta, kappa)])
142
143 # Save training performance

~/anaconda2/envs/python3/lib/python3.6/site-packages/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs)
1612 sample_weight=val_sample_weight,
1613 check_batch_axis=False,
-> 1614 batch_size=batch_size)
1615 if self.uses_learning_phase and not isinstance(K.learning_phase(), int):
1616 val_ins = val_x + val_y + val_sample_weights + [0.]

~/anaconda2/envs/python3/lib/python3.6/site-packages/keras/engine/training.py in _standardize_user_data(self, x, y, sample_weight, class_weight, check_batch_axis, batch_size)
1428 output_shapes,
1429 check_batch_axis=False,
-> 1430 exception_prefix='target')
1431 sample_weights = _standardize_sample_weights(sample_weight,
1432 self._feed_output_names)

~/anaconda2/envs/python3/lib/python3.6/site-packages/keras/engine/training.py in _standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
53 raise ValueError('Error when checking model ' +
54 exception_prefix + ': '
---> 55 'expected no data, but got:', data)
56 return []
57 if data is None:

ValueError: ('Error when checking model target: expected no data, but got:', array([[5.000000e+00, 2.440000e+02, 4.000000e+00, ..., 1.486718e+06,
7.000000e+00, 6.000000e+00],
[0.000000e+00, 2.880000e+02, 0.000000e+00, ..., 3.668960e+05,
0.000000e+00, 2.000000e+00],
[7.000000e+00, 1.620000e+02, 4.000000e+00, ..., 6.256400e+05,
3.000000e+00, 2.000000e+00],
...,
[1.300000e+01, 3.045000e+03, 6.000000e+00, ..., 5.851519e+06,
4.100000e+01, 4.800000e+01],
[7.000000e+00, 5.060000e+02, 2.000000e+00, ..., 1.172282e+06,
2.000000e+00, 6.000000e+00],
[2.000000e+00, 6.970000e+02, 1.000000e+00, ..., 3.982010e+05,
1.000000e+00, 0.000000e+00]]))

from tybalt.

gwaybio avatar gwaybio commented on June 1, 2024

It looks like Keras 2.1.3 (source) expects the argument to be:

validation_data=(x_array, None)

# instead of the previously required
validation_data=(x_array, x_array)

I saw this solution in keras-team/keras#7856

I can confirm this works in fitting Tybalt

print(keras.__version__)
tf.__version__
2.1.3
'1.4.1'

from tybalt.

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.