You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but javacpp TransformerImpl lack [layer_norm_eps=1e-05, batch_first=False, norm_first=False, ] three parameter not supply ,so how to pass these parameter in javacpp
public TransformerOptions(
@Cast("int64_t") long d_model,
@Cast("int64_t") long nhead,
@Cast("int64_t") long num_encoder_layers,
@Cast("int64_t") long num_decoder_layers) { super((Pointer)null); allocate(d_model, nhead, num_encoder_layers, num_decoder_layers); }
private native void allocate(
@Cast("int64_t") long d_model,
@Cast("int64_t") long nhead,
@Cast("int64_t") long num_encoder_layers,
@Cast("int64_t") long num_decoder_layers);
public native @Cast("int64_t*") @ByRef @NoException(true) LongPointer d_model();
public native @Cast("int64_t*") @ByRef @NoException(true) LongPointer nhead();
public native @Cast("int64_t*") @ByRef @NoException(true) LongPointer num_encoder_layers();
public native @Cast("int64_t*") @ByRef @NoException(true) LongPointer num_decoder_layers();
public native @Cast("int64_t*") @ByRef @NoException(true) LongPointer dim_feedforward();
public native @ByRef @NoException(true) DoublePointer dropout();
public native @ByRef @NoException(true) TransformerActivation activation();
public native @ByRef @NoException(true) AnyModule custom_encoder();
public native @ByRef @NoException(true) AnyModule custom_decoder();
class Transformer dModel:Long =512 ,nhead:Long = 8, numEncoderLayers:Long=6,numDecoderLayers:Long=6,
dimFeedforward :Long=2048,dropout:Double=0.1,
customEncoder:Option[AnyModule] = None,
customDecoder:Option[AnyModule] = None,
activation: TransformerActivation ,bias: Boolean = true
The text was updated successfully, but these errors were encountered:
Hi,
I find javacpp-pytorch some layer impl not the same as python pytorch and cpp libtorch ,like transformer layer
https://pytorch.org/docs/stable/generated/torch.nn.Transformer.html
but javacpp TransformerImpl lack [layer_norm_eps=1e-05, batch_first=False, norm_first=False, ] three parameter not supply ,so how to pass these parameter in javacpp
The text was updated successfully, but these errors were encountered: