config = {"value": value}
for fw in framework_iterator(frameworks=["tf", "tfe", "torch", None]):
fw_ = fw if fw != "tfe" else "tf"
constant = from_config(ConstantSchedule, config, framework=fw_)
for t in ts:
out = constant(t)
check(out, value)
After Change
ts_as_tensors = self._get_framework_tensors(ts, fw)
for t in ts_as_tensors:
out = constant(t)
assert fw != "tf" or isinstance(out, tf.Tensor)
check(out, value, decimals=4)
def test_linear_schedule(self):