小编raf*_*man的帖子

TensorFlow:InternalError:Blas SGEMM启动失败

当我跑步时,sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})我得到了InternalError: Blas SGEMM launch failed.这是完整的错误和堆栈跟踪:

InternalErrorTraceback (most recent call last)
<ipython-input-9-a3261a02bdce> in <module>()
      1 batch_xs, batch_ys = mnist.train.next_batch(100)
----> 2 sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
    338     try:
    339       result = self._run(None, fetches, feed_dict, options_ptr,
--> 340                          run_metadata_ptr)
    341       if run_metadata:
    342         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
    562     try:
    563       results = self._do_run(handle, target_list, unique_fetches,
--> 564                              feed_dict_string, options, run_metadata) …
Run Code Online (Sandbox Code Playgroud)

blas tensorflow

67
推荐指数
2
解决办法
5万
查看次数

如何在Express.js中强制使用SSL/https

我正在尝试为Express.js创建一个中间件,将所有非安全(端口80)流量重定向到安全的SSL端口(443).不幸的是,Express.js请求中没有信息可以让您确定请求是通过http还是https.

一种解决方案是重定向每个请求,但这不是我的选择.

笔记:

  1. 使用Apache或其他方法无法处理它.它必须在节点中完成.

  2. 在应用程序中只能启动一个服务器.

你会如何解决这个问题?

ssl https redirect node.js express

57
推荐指数
5
解决办法
5万
查看次数

TensorFlow:Dst张量未初始化

MNIST For ML Beginners教程是给我一个错误,当我运行print(sess.run(accuracy, feed_dict={x: mnist.test.images, y_: mnist.test.labels})).其他一切都很好.

错误和跟踪:

InternalErrorTraceback (most recent call last)
<ipython-input-16-219711f7d235> in <module>()
----> 1 print(sess.run(accuracy, feed_dict={x: mnist.test.images, y_: mnist.test.labels}))

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
    338     try:
    339       result = self._run(None, fetches, feed_dict, options_ptr,
--> 340                          run_metadata_ptr)
    341       if run_metadata:
    342         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
    562     try:
    563       results = self._do_run(handle, target_list, unique_fetches,
--> 564                              feed_dict_string, options, run_metadata)
    565     finally:
    566       # The …
Run Code Online (Sandbox Code Playgroud)

tensorflow

31
推荐指数
3
解决办法
2万
查看次数

如何在Coffeescript中使用setTimeout()

我似乎无法使用setTimeout()来调用我自己的函数之一.我可以使用setTimeout来调用alert(),但不能使用我自己编写的函数.这是重现问题的最简单的代码:

我有以下coffeeScript

    setTimeout(run, 1000)

    run = () ->
        console.log("run was called!")
Run Code Online (Sandbox Code Playgroud)

这会生成以下Javascript

    // Generated by CoffeeScript 1.6.3
    (function() {
      var run;

      setTimeout(run, 1000);

      run = function() {
        return console.log("run was called!");
      };

    }).call(this);
Run Code Online (Sandbox Code Playgroud)

控制台上没有任何内容.

coffeescript

20
推荐指数
2
解决办法
2万
查看次数

连续的,重叠的数组子集(NumPy,Python)

我有一个NumPy数组,[1,2,3,4,5,6,7,8,9,10,11,12,13,14]并希望有一个像这样的数组[[1,2,3,4], [2,3,4,5], [3,4,5,6], ..., [11,12,13,14]].

当然这可以通过循环大数组并将长度为4的数组添加到新数组中,但我很好奇是否有一些秘密的'魔术'Python方法正在做这个:)

python numpy scipy

12
推荐指数
2
解决办法
6569
查看次数

TensorBoard无法正常工作

我可以使用TensorFlow就好了.但我还不能使用TensorBoard.我按照tensorflow.org的可视化学习页面上的说明进行操作.

我跑的时候

tensorboard --logdir=/tmp/mnist_logs --debug
Run Code Online (Sandbox Code Playgroud)

我得到以下内容

INFO:tensorflow:TensorBoard is in debug mode.
INFO:tensorflow:Starting TensorBoard in directory /private/tmp/mnist_logs
INFO:tensorflow:TensorBoard path_to_run is: {'/tmp/mnist_logs': None}
INFO:tensorflow:Adding events from directory /tmp/mnist_logs
INFO:tensorflow:Constructing EventAccumulator for /tmp/mnist_logs
DEBUG:tensorflow:Opening a record reader pointing at /tmp/mnist_logs/events.out.tfevents.1457792617.Rafaels-MacBook-Air
WARNING:tensorflow:IOError [Errno 2] No such file or directory: '/usr/local/lib/python3.5/site-packages/tensorflow/tensorboard/TAG' on path /usr/local/lib/python3.5/site-packages/tensorflow/tensorboard/TAG
WARNING:tensorflow:Unable to read TensorBoard tag
Starting TensorBoard  on port 6006
(You can navigate to http://0.0.0.0:6006)
DEBUG:tensorflow:No more events in /tmp/mnist_logs/events.out.tfevents.1457792617.Rafaels-MacBook-Air
INFO:tensorflow:No more files in /tmp/mnist_logs
DEBUG:tensorflow:No more events in …
Run Code Online (Sandbox Code Playgroud)

tensorflow tensorboard

11
推荐指数
1
解决办法
2万
查看次数

以下运行时错误意味着什么:"在没有活动异常的情况下终止调用\n已中止"

这个错误让我感到困扰了大约两天:当运行代码时,我有一个运行时错误"终止被调用而没有活动异常\n已中止",为什么?

我尝试找到代码并找到该行可能退出代码"xx = new int [num]",我的测试用例中的num约为640000(64MB内存为新).当我将num设置为小得多为10时,没关系,但这次我的代码得到了错误的答案.

我尝试删除所有"try/catch"子句但仍然有此错误.

另外我//所有调用"xx = new int [num]"子句的函数,错误仍然存​​在,而这次我找到的代码可能退出是一个正常的"for循环".

所有情况都通过了编译器,你在运行代码时遇到过这个错误吗?谢谢!

我//一些删除子句并得到以下错误: *检测到glibc* ./ESMF_RegridWeightGen:munmap_chunk():无效指针:0x00000000005cd376 *

c++ try-catch

9
推荐指数
3
解决办法
2万
查看次数

我的EC2实例的公共URL是什么?

一些消息来源表明它是https://ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com/(xxx-xxx-xxx-xxx机器的公共IP地址).但是当我在那里导航时,Chrome说This site can’t be reached.

ip-address amazon-ec2

9
推荐指数
2
解决办法
1万
查看次数

TensorFlow Bazel构建失败

我正在按照TensorFlow的bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer指示使用Bazel构建TensorFlow,并根据来源的说明进行安装.

我收到以下错误:

    ERROR: /home/ubuntu/tensorflow/tensorflow/stream_executor/BUILD:5:1: C++ compilation of rule '//tensorflow/stream_executor:stream_e
xecutor' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool
_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-fr
ee-nonheap-object ... (remaining 87 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exite
d with status 1.   

tensorflow/stream_executor/cuda/cuda_dnn.cc: In function 'cudnnConvolutionFwdAlgo_t perftools::gputools::cuda::{anonymous}::ToConvF
orwardAlgo(perftools::gputools::dnn::AlgorithmType)':                                                                              
tensorflow/stream_executor/cuda/cuda_dnn.cc:269:10: error: 'CUDNN_CONVOLUTION_FWD_ALGO_FFT' was not declared in this scope         
     case CUDNN_CONVOLUTION_FWD_ALGO_FFT:  

...
Run Code Online (Sandbox Code Playgroud)

堆栈:运行Ubuntu 14.04.2的EC2 g2.8xlarge机器.Bazel版本0.1.5(已安装w/bazel-0.1.5-jdk7-installer-linux-x86_64.sh).

我尝试过Bazel 0.1.4和0.2.3,我得到了同样的错误.

bazel tensorflow

6
推荐指数
1
解决办法
3310
查看次数

EC2上的Jupyter:SSL错误

我正在尝试从EC2提供Jupyter笔记本电脑,但出现SSL错误。我正在使用此AMI :TensorFlow GPU - @nottombrown (ami-8ed4d0e4)。我使用了自签名证书,这可能是问题的一部分。

我看过其他一些具有类似错误的SO帖子,例如thisthisthis,但是他们在完全不同的上下文中遇到了错误,因此我不知道如何获得解决方案(例如设置verify=False)为我工作。

[E 15:52:44.954 NotebookApp] Exception in callback (<socket._socketobject object at 0x7f5f993dad00>, <function null_wrapper at 0x7f5f99319758>)
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 883, in start
        handler_func(fd_obj, events)
      File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
        return fn(*args, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 274, in accept_handler
        callback(connection, address)
      File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 239, in _handle_connection
        do_handshake_on_connect=False)
      File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 521, in ssl_wrap_socket
        return ssl.wrap_socket(socket, **dict(context, **kwargs))
      File "/usr/lib/python2.7/ssl.py", …
Run Code Online (Sandbox Code Playgroud)

python ssl jupyter jupyter-notebook

3
推荐指数
2
解决办法
5351
查看次数

在Ubuntu上安装Bazel时出错

我正在尝试在我的EC2 Ubuntu机器上安装Bazel.我wget最新的Bazel版本下载.sh文件,然后运行它sh ./bazel-0.2.1-installer-linux-x86_64.sh.我收到以下错误:

./bazel-0.2.1-installer-linux-x86_64.sh: 106: ./bazel-0.2.1-installer-linux-x86_64.sh: Syntax error: "(" unexpected

查看.sh文件中的第106行,我看到以下行:function usage() {.不知道为什么(那条线会成为一个问题.

我已经使用其他安装尝试(bazel-0.2.1-installer-darwin-x86_64.sh,bazel-0.2.1-jdk7-installer-darwin-x86_64.sh,bazel-0.2.1-jdk7-installer-linux-x86_64.sh)和所有的人都在同一行同样的问题.

ubuntu bazel

3
推荐指数
1
解决办法
1206
查看次数

无法安装PIL

我无法安装PIL.当我跑步时,pip install PIL我得到:

Downloading/unpacking PIL
  Could not find any downloads that satisfy the requirement PIL
Cleaning up...
No distributions at all found for PIL
Storing debug log for failure in /tmp/tmpWJojCu
Run Code Online (Sandbox Code Playgroud)

我试过按照这个问题的答案,但我得到了同样的错误.

Stack:Python 2.7,PIP,EC2 Ubuntu机器.

python python-imaging-library

2
推荐指数
1
解决办法
6686
查看次数

如何在R中加载CSV作为因子

我有一个名为metadata.csv的文件,我想加载到R并转换为一个因子.我开始:

metadata <- read.csv(file="metadata.csv", header=T, stringsAsFactors=T)
Run Code Online (Sandbox Code Playgroud)

这加载CSV就好了.我在这里打印出元数据:

> metadata
                   Filename  Genre   Date Gender
1           Austen_Emma.txt Social  Early Female
2           Bronte_Eyre.txt Social Middle Female
3  Dickens_Expectations.txt Social   Late   Male
4            Eliot_Mill.txt Social   Late Female
5            Lewis_Monk.txt Gothic  Early   Male
6     Radcliffe_Italian.txt Gothic  Early Female
7  Shelley_Frankenstein.txt Gothic Middle Female
8        Stoker_Dracula.txt Gothic   Late   Male
9      Thackeray_Vanity.txt Social Middle   Male
10       Trollope_Vicar.txt Social Middle   Male
Run Code Online (Sandbox Code Playgroud)

现在我想将它转换为一个因素:

as.factor(metadata)
Run Code Online (Sandbox Code Playgroud)

这给了我以下错误:

Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' …
Run Code Online (Sandbox Code Playgroud)

r

0
推荐指数
1
解决办法
891
查看次数