tensorflow / tensorflow/graphics

sizes = "None" failing for Keras DynamicGraphConvolutionKerasLayer implementations

Open
#317 8 comments 0 reactions 1 assignee View on GitHub

@avneesh-sud is already working on this.

Since May 12, 2020.

Dominant language
Python
Stars
2.8k
Forks
374
PR merge metrics
No merged PRs in 30d

Description

Running Environment

  • Ubuntu 19.10, TF 2.1, TF graphics built from repo ~14 days ago.

Issue

  • Documentation for the Keras Layer implementations suggests that the layers can be run with sizes = None, (which is the default). Instead, if sizes = None, or the default is passed, a value error is eventually raised:
    ValueError: The channel dimension of the inputs should be defined. Found 'None'.
    This occurs in the _edge_convolution_template function of convolution/graph_convolution ln. 266

Related
This is similar in nature to the issue raised in issue 13, but differs in that:

  • If input sizes are passed, conversion to dense tensor is consuming unfeasible amounts of memory,
  • it appears that the layers would run with None input at the time of that issue, which is not the case here.

Minimal example reproducing the undesired behaviour

from tensorflow_graphics.nn.layer import graph_convolution as g_nn
import tensorflow as tf
from tensorflow import keras
def min_example():
    input = keras.Input(shape=(1000, 3))

    sparse = tf.sparse.reshape(tf.sparse.eye(1000), shape=[1, 1000, 1000])
    outputs = g_nn.DynamicGraphConvolutionKerasLayer(num_output_channels=64, reduction='weighted', name='EdgeConv0')(
        inputs=[input, sparse],
    )
    model = keras.Model(inputs=[input], outputs=[outputs])

    return model

if __name__ == "__main__":
    min_example()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.