提交 270d35fa authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added NaN variable

上级 4b1a5597
from type import Type
from graph import Variable
class NaNType(Type):
def __init__(self, why_nan = '(no explanation given)'):
"""
why_nan: A string explaining why this variable is NaN
"""
self.why_nane = why_nan
def filter(self, data, strict=False, allow_downcast=None):
raise
def filter_variable(self, other):
raise
def may_share_memory(a, b):
return False
def values_eq(a, b, force_same_dtype=True):
raise
class NaNVariable(Variable):
def __init__(self, why_nan = '(no explanation given)'):
"""
why_nan: A string explaining why this variable is NaN
"""
self.type = NaNType(why_nan)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论