Coder Social home page Coder Social logo

Comments (4)

hfawaz avatar hfawaz commented on May 23, 2024 1

Hello,

I am very glad that my code and paper were helpful !!

As for your error regarding MCNN, I think the network is being fed a kernel_size equal to zero.

Can you make sure what values you are choosing for the kernel_size ?

kernel_size = int(ori_len * filter_size)

You should make sure that this equation is not zero.

In your case ori_len=14 (if I am not wrong).

Then you should change the values in filter_sizes.

To sum up, try to remove the 0.05 in this line.

Let me know if this fixes the error.

Best regards,

from dl-4-tsc.

tsafs avatar tsafs commented on May 23, 2024

Thank you very much for your quick response. Indeed, your proposed solution fixed the error.

Best regards,

from dl-4-tsc.

hfawaz avatar hfawaz commented on May 23, 2024

Glad to help!

Do not hesitate if you have any other questions.

Best regards,

Hassan

from dl-4-tsc.

jayanti-prasad avatar jayanti-prasad commented on May 23, 2024

where is the answer ?
This is strange that 'tf' has an object 'assign' but that does not seem working !

import tensorflow.compat.v1 as tf
tf.disable_eager_execution()
theta=tf.constant(1)
gradiants=tf.constant(3)
learning_rate=tf.constant(2)
dir(tf.assign)
['annotations', 'call', 'class', 'closure', 'code', 'defaults', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'get', 'getattribute', 'globals', 'gt', 'hash', 'init', 'init_subclass', 'kwdefaults', 'le', 'lt', 'module', 'name', 'ne', 'new', 'qualname', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', '_tf_api_names', '_tf_api_names_v1']
training_op = tf.assign(theta, theta - learning_rate * gradiants)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/ops/state_ops.py", line 228, in assign
return ref.assign(value, name=name)
AttributeError: 'Tensor' object has no attribute 'assign'

from dl-4-tsc.

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.