Issam28 / Brain-tumor-segmentation

A deep learning based approach for brain tumor MRI segmentation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

franck-allou opened this issue · 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