GithubHelp home page GithubHelp logo

alberthg / coursera-deep-learning-deeplearning.ai Goto Github PK

View Code? Open in Web Editor NEW
427.0 427.0 261.0 487.72 MB

(完结)网易云课堂微专业《深度学习工程师》听课笔记,编程作业和课后练习

Home Page: https://github.com/AlbertHG/Coursera-Deep-Learning-deeplearning.ai

License: MIT License

Jupyter Notebook 97.99% Python 2.01%
answers coursera deep-learning deeplearning-ai programing-assignments

coursera-deep-learning-deeplearning.ai's Issues

第一张第4周作业答案有问题

01-Neural Networks and Deep Learning/week4/answer-Building your Deep Neural Network-Step by Step.ipynb
函数 L_model_backward 中有一段for循环

for l in reversed(range(L-1)):
    current_cache = caches[L - 2 - l]
    dA_prev_temp, dW_temp, db_temp = linear_activation_backward(grads["dA" + str(L)], current_cache, activation = 'relu')

我感觉有点问题。
我的答案是

for l in reversed(range(L - 1)):
    current_cache = caches[l]
    dA_prev_temp, dW_temp, db_temp = linear_activation_backward(grads["dA" + str(l + 2)], current_cache, "relu")

你认为呢?

yolo.h5导入编码错误问题

raw_code = codecs.decode(code.encode('ascii'), 'base64')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe3' in position 0: ordinal not in range(128

AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu'

在运行报错!!!

yolo_model = load_model("model_data/yolo.h5")
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-24-7a6f0063995c> in <module>()
----> 1 yolo_model = load_model("model_data/yolo.h5")

C:\ProgramData\Anaconda3\lib\site-packages\keras\models.py in load_model(filepath, custom_objects, compile)
    241 
    242         # set weights
--> 243         topology.load_weights_from_hdf5_group(f['model_weights'], model.layers)
    244 
    245         # Early return if compilation is not required.

C:\ProgramData\Anaconda3\lib\site-packages\keras\models.py in model_from_config(config, custom_objects)
    315 
    316 
--> 317 def model_from_yaml(yaml_string, custom_objects=None):
    318     """Parses a yaml model configuration file and returns a model instance.
    319 

C:\ProgramData\Anaconda3\lib\site-packages\keras\layers\__init__.py in deserialize(config, custom_objects)
     53                                     module_objects=globs,
     54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')

C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
    142                 return cls.from_config(config['config'])
    143         else:
--> 144             # Then `cls` may be a function returning a class.
    145             # in this case by convention `config` holds
    146             # the kwargs of the function.

C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py in from_config(cls, config, custom_objects)
   2518 
   2519     def save(self, filepath, overwrite=True, include_optimizer=True):
-> 2520         """Save the model to a single HDF5 file.
   2521 
   2522         The savefile includes:

C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py in process_node(layer, node_data)
   2475             layer = deserialize_layer(layer_data,
   2476                                       custom_objects=custom_objects)
-> 2477             created_layers[layer_name] = layer
   2478 
   2479             # Gather layer inputs.

C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py in __call__(self, inputs, **kwargs)
    615             if len(output_ls_copy) == 1:
    616                 output = output_ls_copy[0]
--> 617             else:
    618                 output = output_ls_copy
    619 

C:\ProgramData\Anaconda3\lib\site-packages\keras\layers\advanced_activations.py in call(self, inputs)
     44         config = {'alpha': float(self.alpha)}
     45         base_config = super(LeakyReLU, self).get_config()
---> 46         return dict(list(base_config.items()) + list(config.items()))
     47 
     48 

C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py in relu(x, alpha, max_value)
   2916 
   2917     output_shape = output.get_shape()
-> 2918     targets = cast(flatten(target), 'int64')
   2919     logits = tf.reshape(output, [-1, int(output_shape[-1])])
   2920     res = tf.nn.sparse_softmax_cross_entropy_with_logits(

AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu'

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.