Code Monkey home page Code Monkey logo

active-shift-tf's People

Contributors

jyh2986 avatar queequeg92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

active-shift-tf's Issues

call c++ library from tensorflow - FallbackException : Expecting int64_t

Since the environment is different as follows I changed some options.
[environment]
CentOS 17.4
tensorflow-gpu 2.0.0
CUDA 10.0
CUDNN7.4.2
gcc8.3.2

By using tf_upgrade_v2, test_forward_ASL.py run and I can the test_forward_ASL.py
However, when I run test_gradient_ASL.py
I firstly met following error. Warning]WARNING:tensorflow:From test_gradient_ASL-TF20.py:45: compute_gradient_error (from tensorflow.python.ops.gradient_checker) is deprecated and will be removed in a future version. Instructions for updating: Use tf.test.compute_gradient in 2.0, which has better support for functions. Note that the two versions have different usage, so code change is needed.

[compile Errror] for code line 45, 73,
Attribute Error err = gradient_checker.compute_gradient_error(a, arr.shape, result, result.get_shape().as_list(), x_init_value=arr)
err = gradient_checker.compute_gradient_error(c, shift.shape,result, result.get_shape().as_list(), x_init_value=shift)
AttributeError: Tensor.graph is meaningless when eager execution is enabled. Thus I changed gradient_checker.compute_gradient_error function like below.

    strides = [1, 1, stride_h, stride_w]
    paddings = [0, 0, pad_h, pad_w]
    strides_tf = tf.constant(strides, dtype=tf.int64)
    paddings_tf = tf.constant(paddings, dtype=tf.int64)

    theoretical, numerical = tf.test.compute_gradient(active_shift2d_op.active_shift2d_op, [a, c, strides_tf, paddings_tf])

However, I met another error
Traceback (most recent call last): File "", line 54, in active_shift2d_op tensorflow.python.eager.core._FallbackException: Expecting int64_t value for attr strides, got tensorflow.python.framework.ops.EagerTensor
TypeError: Expected list for 'strides' argument to 'active_shift2d_op' Op, not .
library file is made by c++, thus it has int64_t data type, however tensorflow doesn't have int64_t type.

How can I resolve the error by removing type difference?

Thank you in advance~

Build successfully, but fail to test.

Hi, I have followed your instructions to build the Op successfully. Then I tried to run the test code. And I got the error message:
InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'ActiveShift2DOp' with these attrs. Registered devices: [CPU], Registered kernels:
device='GPU'; T in [DT_DOUBLE]
device='GPU'; T in [DT_FLOAT]

Could you help to figure out what is wrong? Thank you!

error running build.sh

I tried to run build.sh and I ran into this trouble:
tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:24:31: fatal error: cuda/include/cuda.h: No such file or directory
#include "cuda/include/cuda.h"

I use tensorflow 1.4.1, cuda 8.0 cudnn 6.0 and g++4.9
Any help?

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.