Tensorflow tf.batch_matrix_diag (no attribute error) - tensorflow

One one machine, I have tensorflow version 0.11.0rc0 and on another machine tensorflow 0.10.0rc0. On the latter, tf.batch_matrix_diag works fine, but on the former, I get the error AttributeError: 'module' object has no attribute 'batch_matrix_diag'
---EDIT---
The same error is occuring for batch_cholesky as well..
Could someone please explain how to fix this?

I believe you need to use matrix_diag instead of batch_matrix_diag due to this change.

Related

"AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width " with pandas_bokeh

I am trying to use pandas_bokeh to create a line graph with a pandas dataframe I call bucketed_df
import pandas_bokeh
pandas_bokeh.output_notebook()
bucketed_df.plot_bokeh(kind='line')
for some reason I get the error
AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width
Im not sure what this is or how toi fix it. I am using python 3.9 and jupyter notebooks
I have a matplotlib linegraph in a cell above it. I am thinking there could be some issue with that.
Also if anyone knows any interactive graphs that are better I am open to switching to a different library.
I'm getting a similar error on a recent install of bokeh==3.0.1.
The error goes away if I install version 2.4.3 (last release) with pip install --upgrade bokeh==2.4.3
It seems there was a breaking change in 3.0.0 that hasn't been addressed yet. If you have time, post this issue at https://github.com/bokeh/bokeh/issues.
temp way:
File ".../lib/python3.10/site-packages/pandas_bokeh/plot.py", line 439, in plot
Add
figure_options['width'] = figure_options['plot_width']
figure_options['height'] = figure_options['plot_height']
del figure_options['plot_width']
del figure_options['plot_height']
can be done like
p=figure(min_width=500, height=500)
or simply,
p=figure(width=500, height=500)
this may help.

I am getting error while executing my code as mediapipe.python.solutions has no attribute selfie_segmentation

self.mpSelfieSegmentation = mp.solutions.selfie_segmentation
AttributeError: module 'mediapipe.python.solutions' has no attribute 'selfie_segmentation'
Any one has solution for this?
I had the same issue, and I was initially on mediapipe==0.8.3.
Issue was resolved once I updated to mediapipe==0.8.9.1 using pip install mediapipe==0.8.9.1.

CatBoost Error: bayesian bootstrap doesn't support taken fraction option

The error occur when running gridsearchcv using catboostclassifier and bootstrap_type='Bayesian'. Any idea what that error means?
I had similar issue while training my data with CatBoostClassifier. I had set the "subsample" parameter to "0.5". After removing this parameter, it worked for me.
More details at: enter link description here
Hope this is useful.

TensorFlow in PyCharm value error: Failed to find data adapter that can handle input

I am referring TensorFlow speciliazation from Coursera where a certain piece of code works absolutely fine in Google Colab, whereas when I try to run it locally on PyCharm, it gives following error:
Failed to find data adapter that can handle input
Any suggestions?
Can you tell me the code where the error occurred?
It should be available in logs under your PyCharm console.
Looking at your comments, it seems that the model is expecting an array while you provided a list.
I was facing the same issue. Turns out it was a in the form of a list. I had to convert the fields into a numpy array like:
training_padded = np.array(training_padded)
training_labels = np.array(training_labels)
testing_padded = np.array(testing_padded)
testing_labels = np.array(testing_labels)
thats it!
Try it out and let me know if it works.

jackson2.2.0 can not work on android2.2

When using jackson2.2.0 on android2.2(API8), I got this error:
Could not find class java.util.concurrent.ConcurrentNavigableMap, referenced from method com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.<clinit>
I've tested my code on android2.3.3(API10) and android4.0.3(API15), it both works.
Does any one knows how to fix this? Or I have to use another jason parser instead.
This has already been reported on Jackson's issue tracker. A fix is due in 2.2.2 next week or so.