Closed voaneves closed 5 years ago
Reading about similar problems, I found out that a common cause is using different ammount of spaces in indentation. My setup uses 4 and yours uses 2. Do you guys know ny fix for that?
After listing all available methods, 'auto_register_layer' is not available. Listing all available methods:
CODE
layer_collection = kfac.LayerCollection()
method_list = [func for func in dir(layer_collection) if callable(getattr(layer_collection, func)) and not func.startswith("__")]
print(method_list)
OUTPUT
['_add_uses', '_get_block_type', '_get_linked_approx', '_get_use_count_map', 'as_default', 'check_registration', 'create_subgraph', 'define_linked_parameters', 'eval_losses', 'eval_losses_on_samples', 'get_blocks', 'get_factors', 'make_or_get_factor', 'register_block', 'register_categorical_predictive_distribution', 'register_conv2d', 'register_conv2d_multi', 'register_convolution', 'register_depthwise_conv2d', 'register_embedding', 'register_embedding_multi', 'register_fully_connected', 'register_fully_connected_multi', 'register_generic', 'register_loss_function', 'register_multi_bernoulli_predictive_distribution', 'register_normal_predictive_distribution', 'register_separable_conv2d', 'set_default_conv2d_approximation', 'set_default_embedding_approximation', 'set_default_fully_connected_approximation', 'set_default_fully_connected_multi_approximation', 'set_default_generic_approximation', 'total_loss', 'total_sampled_loss']
I ran into this error when I installed kfac using pip ; if you check the installed folders and files, you miss auto_register_layer and apparently it is existing in this github repos.
So what I did is I downloaded the source instead of pip install and it worked.
@jlee4176901 Thanks a lot for your answer!
Changed my import in Jupyter Notebook from:
!pip install kfac
import kfac
to:
!pip install git+https://github.com/tensorflow/kfac.git
import kfac
And the 'auto_register_layers' worked as expected. I'm closing the issue.
Regards, Victor.
Hi there!
While using tf.Keras, with tensorflow backend, I ran into the following error:
I create my model as follows:
Is this expected? Am I doing anything wrong?
Regards, Victor.