zoukankan      html  css  js  c++  java
  • ValueError: The hardcoded shape for thenumber of rows in the filter (5) isn't the run time shape (6)

    Traceback (most recent call last):

     File"E: oolsAnacondalibsite-packages heanocompilefunction_module.py",line 859, in __call__

       outputs = self.fn()

    ValueError: The hardcoded shape for thenumber of rows in the filter (5) isn't the run time shape (6).

    During handling of the above exception,another exception occurred:

    Traceback (most recent call last):

     File "E:/Git/MachineLearning/DeepLearning Tutorials/FaceRecognition_CNN(olivettifaces)/use_cnn_new.py",line 189, in <module>

       use_CNN()

     File "E:/Git/MachineLearning/DeepLearningTutorials/FaceRecognition_CNN(olivettifaces)/use_cnn_new.py", line 180, inuse_CNN

       pred = f(faces)

     File "E: oolsAnacondalibsite-packages heanocompilefunction_module.py",line 871, in __call__

       storage_map=getattr(self.fn, 'storage_map', None))

     File "E: oolsAnacondalibsite-packages heanogoflink.py",line 314, in raise_with_op

       reraise(exc_type, exc_value, exc_trace)

     File "E: oolsAnacondalibsite-packagessix.py", line 685,in reraise

       raise value.with_traceback(tb)

     File"E: oolsAnacondalibsite-packages heanocompilefunction_module.py",line 859, in __call__

       outputs = self.fn()

    ValueError: The hardcoded shape for the number of rows in the filter(5) isn't the run time shape (6).

    Apply node that caused the error:ConvOp{('imshp', (1, 40, 50)),('kshp', (5, 5)),('nkern', 5),('bsize',1680),('dx', 1),('dy', 1),('out_mode', 'valid'),('unroll_batch',2),('unroll_kern', 5),('unroll_patch', False),('imshp_logical', (1, 40,50)),('kshp_logical', (5, 5)),('kshp_logical_top_aligned', True)}(Reshape{4}.0,<TensorType(float64, 4D)>)

    Toposort index: 5

    Inputs types: [TensorType(float64, (False,True, False, False)), TensorType(float64, 4D)]

    Inputs shapes: [(1680, 1, 40, 50), (5, 1,6, 6)]

    Inputs strides: [(16000, 16000, 400, 8),(288, 288, 48, 8)]

    Inputs values: ['not shown', 'not shown']

    Outputs clients: [[Pool{ds=(2, 2),ignore_border=True, st=(2, 2), padding=(0, 0), mode='max'}(ConvOp{('imshp', (1,40, 50)),('kshp', (5, 5)),('nkern', 5),('bsize', 1680),('dx', 1),('dy',1),('out_mode', 'valid'),('unroll_batch', 2),('unroll_kern',5),('unroll_patch', False),('imshp_logical', (1, 40, 50)),('kshp_logical', (5,5)),('kshp_logical_top_aligned', True)}.0)]]

    Backtrace when the node is created(useTheano flag traceback.limit=N to make it longer):

     File "E:/Git/MachineLearning/DeepLearningTutorials/FaceRecognition_CNN(olivettifaces)/use_cnn_new.py", line 189, in<module>

       use_CNN()

     File "E:/Git/MachineLearning/DeepLearningTutorials/FaceRecognition_CNN(olivettifaces)/use_cnn_new.py", line 149, inuse_CNN

       poolsize=(2, 2)

     File "E:/Git/MachineLearning/DeepLearningTutorials/FaceRecognition_CNN(olivettifaces)/use_cnn_new.py", line 111, in__init__

       image_shape=image_shape

    HINT: Use the Theano flag'exception_verbosity=high' for a debugprint and storage map footprint of thisapply node.

    ValueError: The hardcoded shape for the number of rows in the filter(5) isn't the run time shape (6).来自于theano.tensor.nnet.conv

    很明显的错误,就是训练时的滤波器大小和使用时的滤波器大小不一样。

    眼花了,没看到训练时用的滤波器大小是6



  • 相关阅读:
    [Swift]LeetCode773. 滑动谜题 | Sliding Puzzle
    [Swift]LeetCode771. 宝石与石头 | Jewels and Stones
    [Swift]LeetCode770. 基本计算器 IV | Basic Calculator IV
    [Swift]LeetCode769. 最多能完成排序的块 | Max Chunks To Make Sorted
    [Swift]LeetCode768. 最多能完成排序的块 II | Max Chunks To Make Sorted II
    转 玩转Bash变量
    转 shell脚本学习指南
    转: 两个 Shell 网站: explainshell 和 shellcheck
    转 BAT CMD 批处理文件脚本总结(中文)
    转 windows 下 Oracle 导出表结构
  • 原文地址:https://www.cnblogs.com/mandalalala/p/6798266.html
Copyright © 2011-2022 走看看