deepgram / kur

Descriptive Deep Learning
Apache License 2.0
814 stars 107 forks source link

dependency graph resolution #39

Closed josh-gree closed 7 years ago

josh-gree commented 7 years ago

Hi

So I have run into the following value error;

ValueError: No change during dependency graph resolution. There is something wrong with the graph.

It occurs when trying to use kurfile.get_model() on the following .yml

settings:
  layer_reps: 2
  module_reps: 3
  cs: 16

model:

 - input:
    shape: [512,512,1]
   name: in

 - for:
    range: "{{module_reps}}"
    with_index: j
    iterate:

     - for:
        range: "{{layer_reps}}"
        with_index: i
        iterate:

         - convolution:
            kernels: "{{cs*2**j}}"
            size: [3,3]
           name: "m{{j}}_c{{i}}"
           sink: yes

         - activation: relu

     - pool:
        size: [2,2]
        strides: [2,2]
        type: max
       name: "m{{j}}_p"
       sink: yes

     - dense:
        size: "{{cs*2**module_reps}}"
       sink: yes
       name: middle

Now the issue seems to be in the naming of the dense layer. Without the name everything works fine...

Thanks Josh

josh-gree commented 7 years ago

Sorry was due to the dense being in the for loop and not having multiple names or variable size...Silly me!

ajsyp commented 7 years ago

No problem. There are multiple ways to specify names, in case you need to refer to them later.