Giter VIP home page Giter VIP logo

Comments (7)

Liang-yc avatar Liang-yc commented on August 29, 2024
  1. 你先把D:\ProgramData\ssq-master\dlt_model\ 路径下的文件都删了,再跑一遍,看下有没有问题;
  2. 如果步骤1有问题,麻烦确认下你下的是不是github上的最新版,代码有没有改过?然后再贴一下你的环境配置还有运行的命令。

from ssq.

ziyu211 avatar ziyu211 commented on August 29, 2024

D:\ProgramData\Anaconda3\python.exe D:/ProgramData/ssq-master/ssq4all.py
2019-10-31 16:28:47.827743: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2019-10-31 16:28:47.827743: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2019-10-31 16:28:47.827743: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2019-10-31 16:28:47.827743: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2019-10-31 16:28:47.827743: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.

start training...

2019-10-31 16:28:58.214069: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:1158] Invalid argument: stride must be less than or equal to kernel size
WARNING:tensorflow:Error encountered when serializing LAYER_NAME_UIDS.
Type is unsupported, or the types of the items don't match field type in CollectionDef.
'dict' object has no attribute 'name'

Last epoch were saved, next time will start from epoch 0.

Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1139, in _do_call
return fn(*args)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1121, in _run_fn
status, run_metadata)
File "D:\ProgramData\Anaconda3\lib\contextlib.py", line 66, in exit
next(self.gen)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: stride must be less than or equal to kernel size
[[Node: gradients/conv3_0/AvgPool_grad/AvgPoolGrad = AvgPoolGrad[T=DT_FLOAT, data_format="NHWC", ksize=[1, 1, 1, 1], padding="VALID", strides=[1, 2, 2, 1], _device="/job:localhost/replica:0/task:0/cpu:0"](gradients/conv3_0/AvgPool_grad/Shape, gradients/conv3_0/Pad_grad/Slice_1)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/ProgramData/ssq-master/ssq4all.py", line 120, in
tf.app.run()
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "D:/ProgramData/ssq-master/ssq4all.py", line 116, in main
run_training()
File "D:/ProgramData/ssq-master/ssq4all.py", line 102, in run_training
], feed_dict={input_data: inputdata, output_targets: outputdata})
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 789, in run
run_metadata_ptr)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: stride must be less than or equal to kernel size
[[Node: gradients/conv3_0/AvgPool_grad/AvgPoolGrad = AvgPoolGrad[T=DT_FLOAT, data_format="NHWC", ksize=[1, 1, 1, 1], padding="VALID", strides=[1, 2, 2, 1], _device="/job:localhost/replica:0/task:0/cpu:0"](gradients/conv3_0/AvgPool_grad/Shape, gradients/conv3_0/Pad_grad/Slice_1)]]

Caused by op 'gradients/conv3_0/AvgPool_grad/AvgPoolGrad', defined at:
File "D:/ProgramData/ssq-master/ssq4all.py", line 120, in
tf.app.run()
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "D:/ProgramData/ssq-master/ssq4all.py", line 116, in main
run_training()
File "D:/ProgramData/ssq-master/ssq4all.py", line 61, in run_training
rnn_size=128, num_layers=7, batch_size=FLAGS.batch_size, learning_rate=FLAGS.learning_rate)
File "D:\ProgramData\ssq-master\poems\model.py", line 122, in rnn_model
train_op = tf.train.AdamOptimizer(learning_rate).minimize(total_loss)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\optimizer.py", line 315, in minimize
grad_loss=grad_loss)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\optimizer.py", line 386, in compute_gradients
colocate_gradients_with_ops=colocate_gradients_with_ops)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 540, in gradients
grad_scope, op, func_call, lambda: grad_fn(op, *out_grads))
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 346, in _MaybeCompile
return grad_fn() # Exit early
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 540, in
grad_scope, op, func_call, lambda: grad_fn(op, *out_grads))
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_grad.py", line 504, in _AvgPoolGrad
data_format=op.get_attr("data_format"))
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 153, in _avg_pool_grad
data_format=data_format, name=name)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
op_def=op_def)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1269, in init
self._traceback = _extract_stack()

...which was originally created as op 'conv3_0/AvgPool', defined at:
File "D:/ProgramData/ssq-master/ssq4all.py", line 120, in
tf.app.run()
[elided 1 identical lines from previous traceback]
File "D:/ProgramData/ssq-master/ssq4all.py", line 116, in main
run_training()
File "D:/ProgramData/ssq-master/ssq4all.py", line 56, in run_training
logits = inference(input_data, 2, reuse=False,output_num=128)
File "D:\ProgramData\ssq-master\poems\resnet.py", line 193, in inference
conv3 = residual_block(layers[-1], 64)
File "D:\ProgramData\ssq-master\poems\resnet.py", line 150, in residual_block
strides=[1, 2, 2, 1], padding='VALID')
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1741, in avg_pool
name=name)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 48, in _avg_pool
data_format=data_format, name=name)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 767, in apply_op
op_def=op_def)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1269, in init
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): stride must be less than or equal to kernel size
[[Node: gradients/conv3_0/AvgPool_grad/AvgPoolGrad = AvgPoolGrad[T=DT_FLOAT, data_format="NHWC", ksize=[1, 1, 1, 1], padding="VALID", strides=[1, 2, 2, 1], _device="/job:localhost/replica:0/task:0/cpu:0"](gradients/conv3_0/AvgPool_grad/Shape, gradients/conv3_0/Pad_grad/Slice_1)]]

from ssq.

ziyu211 avatar ziyu211 commented on August 29, 2024

pycharm 下运行出现的错误

from ssq.

ziyu211 avatar ziyu211 commented on August 29, 2024

删了重新跑还是这个错误

from ssq.

ziyu211 avatar ziyu211 commented on August 29, 2024

Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1
900 64 bit (AMD64)] on win32
tensorflow (1.2.0rc0)
pyexcel-xls (0.5.8)
需要GPU服务器吗?

from ssq.

Liang-yc avatar Liang-yc commented on August 29, 2024
  1. 不需要GPU也能跑的;
  2. 请重新下一遍我的项目,再跑一遍;
  3. 如果真的运行不了,麻烦提供下出错的项目代码http链接(你自己新建一个repo就好了,保证错误可复现;我重新下了我在github上的项目,在cmd窗口和pycharm上均可运行);

from ssq.

ziyu211 avatar ziyu211 commented on August 29, 2024

tensorflow (1.2.0rc0) 从1.2 升级到1.6现在不报之前的错误了,现新配个环境测试一下

from ssq.

Related Issues (20)

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.