pfnet-research / chainer-compiler

Experimental toolchain to compile and run Chainer models
MIT License
112 stars 23 forks source link

Add join() to take union of 2 type environments #813

Closed momohatt closed 4 years ago

momohatt commented 4 years ago

This PR adds join, a function that returns the union of two types.

# examples
join(int, NoneType) # --> optional(int)
join(tensor(float32, (1,)), tensor(float32, (2,))) # --> tensor(float32, (None,))

Unlike unify, this does not modify the argument types.

shinh commented 4 years ago

/test

pfn-ci-bot commented 4 years ago

Successfully created a job for commit e38b6fd: