Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

DType support#2559

Closed
Godricly wants to merge 7 commits intoapache:masterfrom
Godricly:fp16_support
Closed

DType support#2559
Godricly wants to merge 7 commits intoapache:masterfrom
Godricly:fp16_support

Conversation

@Godricly
Copy link
Copy Markdown
Contributor

@Godricly Godricly commented Jun 28, 2016

init_param is changed to support DType.

Godricly added 3 commits June 28, 2016 16:54
using default float, double for their own initialization. The other  types use values which are cast from float type.
@Godricly Godricly changed the title Fp16 support DTYpe support Jun 28, 2016
@Godricly Godricly changed the title DTYpe support DType support Jun 28, 2016
tmp = empty(out.shape, out.ctx)
tmp = NDArray._sample_normal(loc=loc, scale=scale, shape=out.shape, out=tmp)
out[:] = tmp
return out
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we missed an else above?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah...yes...sry for that....I manually typed my code here..

# currently, input_types is not passed in
if input_types is None:
input_types = {k : mx_real_t for k in input_shapes.keys()}
arg_types, _, aux_types = self.symbol.infer_type(**input_types)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd better make sure that the change here does not affect other existing examples (like image classification and LSTM).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be ok as default infer_type gives float type.

@tqchen
Copy link
Copy Markdown
Member

tqchen commented Jun 28, 2016

get_random currently will fail under current resource manager. Need to modify the resource manager in order to support this. So let us remove random support for now and make it a separate PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants