Comments (8)
@sachinprasadhs,
I was able to reproduce the issue on tensorflow v2.11 and tf-nightly. Kindly find the gist of it here.
from tf-keras.
@DeveshS215 Seems the problem is tf.get_static_value(image_ith_filter_entropy)
returns None
because of the tensor value cannot be calculated.
Would you please help simplify the code to the specific function and its arguments?
Thanks.
from tf-keras.
Thank you for your help. But the thing is I already provided the simplified code as much I can. I can't simplify more because I need to calculate the entropy of each feature map of each image. But in keras layer the batch size is None during model building and so we can't calculate entropy and this is the reason of getting error and I am unable to resolve it.
from tf-keras.
@DeveshS215 I think the above gist is not complete as entropy_sort_index
is not defined. Also it is not clear to me what .item()
method should do in this case? Can you clarify it a bit more?
Thanks.
from tf-keras.
After consulting the team, we do not aware of any good solution. Let's leave this issue open to see if we can either find some community help on how to implement or consolidate the feature request to a more concrete one.
from tf-keras.
@Frightera Thanks for pointing my mistake. Actually its not entropy_sort_index
instead it is entropy_array
. I have corrected it. I am really sorry for it.
For .item()
method : I need value of image_ith_filter_entropy
to append in entropy
list as number, so I used .item()
to get the value as number because tf.get_static_value()
returns value in ndarray format.
Thanks.
from tf-keras.
OK.
Thanks for your help.
from tf-keras.
@DeveshS215 I see, so if it is a scalar value, maybe you can employ some logic using tf.reduce.xxx
.
from tf-keras.
Related Issues (20)
- Calling a model and using model.predict yields different results for the same input HOT 5
- StringLookup layer never releases memory on load HOT 3
- Add a dedicated file for Keras' security policy HOT 1
- Accurarcy() does not work, but 'accuracy' does HOT 8
- L1 penalty set small weights to 0 HOT 9
- `Cannot iterate over a scalar tensor.` with split_dataset HOT 4
- Add a dedicated file for Keras' security policy
- Feature: Flops calculation
- NotFoundError could not find registered transfer manager for platform Host -- check target linkage [Op:__inference__jit_compiled_convolution_op_26169] HOT 3
- Error importing model with both load_model (.keras) and load_weights (.h5) HOT 10
- Using Lambda layers to take different slices of a prevous layer's output causes earlier Lambda layers to be overwritten HOT 5
- Error while importing tf_keras HOT 11
- shape issue for y_pred for a custom made loss function HOT 3
- Add a target_width parameter to keras.utils.timeseries_dataset_from_array HOT 4
- UNIMPLEMENTED: Cast string to float is not supported; CANCELLED: Function was cancelled before it was started HOT 3
- TextVectorization: output_mode={multi_hot, count} promise int arrays but output floats
- Cloning a TextVectorization Layer with Split Function Doesn't Work HOT 6
- Mirrored strategy model.load_weights() failure HOT 2
- sparse_categorical_crossentropy with ignore_class=-1 makes loss to `nan` HOT 3
- Importing `tf_keras` to use Keras 2 in TensorFlow 2.16 fails HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tf-keras.