Brain-tumor-segmentation icon indicating copy to clipboard operation
Brain-tumor-segmentation copied to clipboard

TypeError: Only integers, slices (`:`), ellipsis (`...`), tf.newaxis (`None`) and scalar tf.int32/tf.int64 tensors are valid indices

Open franck-allou opened this issue 5 years ago • 0 comments

Hi, I would like you to help and fix my problem. I'm using python 3.7 with tensorflow 2.0

def dist_pair(self, pair_ixd):
     return tf.compat.v1.losses.absolute_difference(self.h[:, 2*pair_ixd, :], self.h[:, 2*pair_ixd+1, :])

TypeError: Only integers, slices (:), ellipsis (...), tf.newaxis (None) and scalar tf.int32/tf.int64 tensors are valid indices

franck-allou avatar Feb 28 '20 16:02 franck-allou