Hi,
I’m able to create simple operation but seems like some operators are not available in C. Below the Ops I would like to use with Tape
// logprobabilities
    auto softmax = LogSoftmax(root, logitsBufPlc);
    auto onehot = OneHot(root, actionsBufPlc, numActions, 1, 0);
    auto multi = Multiply(root, onehot, softmax);
    auto logprobs = ReduceSum(root, multi, 1);

    // ratio
    auto sub = Subtract(root, logprobs, logProbsBufPlc);
    auto ratio = Exp(root, sub);

    // min advantage
    auto greater = Greater(root, advgBufPlc, 1);
    auto clipmin = Multiply(root, (1 - clipRatio), advgBufPlc);
    auto clipmax = Multiply(root, (1 + clipRatio), advgBufPlc);
    auto minadvg = Where3(root, greater, clipmin, clipmax);
    
    // loss
    auto minv = Min(root, Multiply(root, ratio, advgBufPlc), minadvg);
    auto reducedMean = ReduceMean(root.WithOpName("reduced"), minv, {0, 1});