Andrewsher / X-Net

X-Net: Brain Stroke Lesion Segmentation Based on Depthwise Seperable Convolution and Long Range Dependencies (MICCAI 2019)
51 stars 15 forks source link

type Error #7

Open zhouyuxiang1027 opened 3 years ago

zhouyuxiang1027 commented 3 years ago

When I run the main.py, get a error: File "/home/zyx/program/X-Net-master/FSM.py", line 49, in f = Lambda(lambda z: (1. / float(size[-1])) * z)(f) TypeError: float() argument must be a string or a number, not 'NoneType'

How to solve it? Thank you for your reply.

mrhby commented 3 years ago

When I run the main.py, get a error: File "/home/zyx/program/X-Net-master/FSM.py", line 49, in f = Lambda(lambda z: (1. / float(size[-1])) * z)(f) TypeError: float() argument must be a string or a number, not 'NoneType'

How to solve it? Thank you for your reply.

How did you solve it in the end

Andrewsher commented 1 year ago

Seems like this exception is caused by size of input tensor is not consistent, i.e., the input tensor size is (?, ?, ?, None). Please check your input tensor and input data size.